-
Notifications
You must be signed in to change notification settings - Fork 0
Package Manager
The package manager allows you to install, publish and share reusable services through the Nautica Package Registry. Packages are just Nautica services, and they follow the same structure and lifecycle as any plugin you'd write yourself, but are versioned, published, and installable with a single command.
napi install mongodbNote that napi is just an alias for nautica
This downloads the package, extracts it into plugins/, installs any PyPI dependencies, and writes the version to the lockfile. On the next nautica install, the lockfile ensures the same version is restored.
Every package has a project.n3 at its root, this is the package manifest. It's created automatically by nautica package create and contains:
# Name used on the registry; a-z0-9._- only
name = "mypackage"
# Package version, bump before each publish; format: https://semver.org/
version = "1.0.0"
# List of package names that are required to run this service. Use the names from the registry
dependsOn = []
# PyPI packages it depends on
pyPackages = []When a package is installed, its name and version are written to package-lock.n3:
mongodb = "1.0.0"
nauth = "1.0.1"Running nautica install without arguments reads this file and ensures every listed package is installed at the correct version. If a version mismatch is detected, the package is re-downloaded automatically. Commit the lockfile to version control so everyone on the project gets the same package versions.
A package is a folder in plugins/ with an __init__.py as the entry point. Nautica imports it automatically at startup, no registration needed aside from Service.Export() inside the package.
plugins/
mypackage/
__init__.py # entry point, must contain Service.Export()
project.n3 # package manifestRegular .py files in plugins/ also work for simple single-file plugins that don't need publishing.
See the CLI Reference for the full publishing workflow
- Home
- CLI Reference
- Service Registry
- Built-in Services
- Managers
- Requirement Validators