GitHub

Package Manager (LPM)

Stable LPM is production-ready in Levython 1.0.

LPM (Levython Package Manager) is a native C++ package manager for installing, managing, and removing Levython packages. Unlike other language package managers, LPM requires no external dependencies.

Overview#

LPM can be invoked in two ways:

terminal
# Via levython command
levython lpm <command>

# Or directly
lpm <command>

lpm install <package>#

Install a package:

lpm install <package-name>
terminal
$ lpm install math
Installing math...
✓ Package 'math' installed successfully

$ lpm install tensor
Installing tensor...
✓ Package 'tensor' installed successfully

Packages are installed to ~/.levython/packages/.

lpm remove <package>#

Remove an installed package:

lpm remove <package-name>
terminal
$ lpm remove math
Removing math...
✓ Package 'math' removed successfully

lpm list#

List all installed packages:

lpm list
terminal
$ lpm list
Installed packages:
  • math     - Mathematical functions
  • tensor   - Tensor operations for ML
  • random   - Random number generation

3 packages installed

Search for available packages:

lpm search [query]
terminal
$ lpm search ml
Search results for 'ml':
  • ml       - Machine learning utilities
  • tensor   - Tensor operations for ML

$ lpm search
Available packages:
  • math     - Mathematical functions
  • tensor   - Tensor operations
  • ml       - Machine learning utilities
  • random   - Random number generation
  • test     - Testing framework
  • string   - String manipulation
  • json     - JSON parsing
  • http     - HTTP client/server
  • csv      - CSV file handling

Available Packages#

The following packages are available through LPM:

Package Description Status
math Advanced mathematical functions (sin, cos, sqrt, pow, etc.) Stable
tensor Tensor creation and operations for machine learning Stable
ml Machine learning utilities and helpers Stable
random Random number generation and sampling Stable
test Testing framework with assertions Stable
string String manipulation utilities Stable
json JSON parsing and serialization Stable
http HTTP client and server functionality Stable
csv CSV file reading and writing Stable

Using Installed Packages

Once installed, packages are automatically available in your Levython programs. For example, after installing math:

levython
# After: lpm install math

pi <- 3.14159
radius <- 5

area <- pi * radius * radius
say("Circle area: " + str(area))