A Node.js-style package manager for Python with zero configuration
Project description
๐ Snakeer
A Node.js-style package manager for Python with zero configuration required.
Architecture
Snakeer uses a serverless-first, zero-config architecture:
โโโโโโโโโโโโโโโ HTTP API โโโโโโโโโโโโโโโโโโโ
โ Python โ โโโโโโโโโโโโโโโโโโ> โ Serverless โ
โ Client โ โ Functions โ
โ (snakeer) โ <โโโโโโโโโโโโโโโโโโ โ (Netlify/Vercel)โ
โโโโโโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ
โ No env vars needed โ GITHUB_TOKEN
โ v
โ โโโโโโโโโโโโโโโโ
โ โ GitHub โ
โ โ Repository โ
โ โ Package Storeโ
โ โโโโโโโโโโโโโโโโ
โ
โผ
Automatic fallback:
- Primary: https://snakeer.vercel.app/
- Fallback: https://snakeer-package-api.netlify.app/functions/
Key Design:
- Zero configuration - No environment variables needed on client
- Automatic fallback - If Vercel fails, automatically tries Netlify
- Secure - GITHUB_TOKEN only exists in serverless environment
Features
- ๐ฆ Node.js-style package management - Familiar commands like
install,add,remove,update - ๐ Lock file support - Exact version tracking in
project_packages.json - ๐ Zero configuration - Works out of the box, no setup needed
- ๐ Automatic failover - Vercel primary, Netlify backup
- ๐ Semantic versioning - Support for
>=,^,~version specifiers - ๐ Flat installation - All packages in
snakeer_modules/(no nesting)
Installation
# Clone the repository
git clone https://github.com/andy64lol/snakeer.git
cd snakeer
# Install the package
pip install -e .
# Or install from source
python setup.py install
Quick Start
No configuration needed! Just use it:
# Install all dependencies from project_packages.json
snakeer install
# Add a dependency
snakeer add coolpkg@1.0.0
snakeer add utilpkg@^2.0.0
# List installed packages
snakeer list
# Publish your package
snakeer publish
Use in your code:
from snakeer import require
coolpkg = require("coolpkg")
result = coolpkg.some_function()
CLI Commands
| Command | Description |
|---|---|
snakeer install |
Install all dependencies from project_packages.json |
snakeer add <pkg>@<version> |
Add a new package to dependencies |
snakeer remove <pkg> |
Remove a package from dependencies |
snakeer update [pkg] |
Update packages according to version ranges |
snakeer list |
List installed packages |
snakeer publish |
Publish current package to registry |
How It Works
Automatic API Selection
The client automatically tries APIs in this order:
- Primary:
https://snakeer.vercel.app/api/ - Fallback:
https://snakeer-package-api.netlify.app/functions/
If the primary API fails, it automatically falls back to the secondary.
Serverless Functions
All GitHub API interactions happen in serverless functions:
| Function | Vercel URL | Netlify URL |
|---|---|---|
| Download | /api/download |
/functions/download.js |
| Upload | /api/upload |
/functions/upload.js |
Project Structure
my_project/
โโโ main.py # Your entry point
โโโ project_packages.json # Config + lock file
โโโ snakeer_modules/ # Installed packages
โ โโโ coolpkg/
โ โ โโโ index.py # Package entry
โ โ โโโ metadata.json # Package metadata
โ โโโ utilpkg/
โโโ .snakeer_cache/ # Cached downloads
Configuration (project_packages.json)
{
"name": "my_project",
"version": "1.0.0",
"snakeer_dependencies": {
"coolpkg": ">=1.0.0",
"utilpkg": "^2.1.0"
},
"installed_dependencies_versions": {
"coolpkg": "1.2.3",
"utilpkg": "2.1.5"
}
}
Package Format
Each package in snakeer_modules/ contains:
index.py- Main module with functions/classesmetadata.json- Package metadata and dependencies
Example metadata.json:
{
"name": "coolpkg",
"version": "1.2.3",
"dependencies": {
"utilpkg": ">=2.0.0"
}
}
Version Specifiers
1.0.0- Exact version>=1.0.0- Greater than or equal^1.0.0- Compatible with (same major version)~1.0.0- Approximately equivalent (same major.minor)latest- Latest available version
Serverless Deployment (For Maintainers)
If you're maintaining the Snakeer registry:
Netlify
- Deploy
functions/directory - Set
GITHUB_TOKENin environment variables - URL:
https://snakeer-package-api.netlify.app/functions/
Vercel
- Deploy
api/directory - Set
GITHUB_TOKENin environment variables - URL:
https://snakeer.vercel.app/api/
Required Serverless Environment Variables
GITHUB_TOKEN- GitHub personal access token with repo access (server-side only!)
Development
# Run the demo
python main.py
# Run CLI commands
python -m snakeer install
python -m snakeer add coolpkg@1.0.0
Security
- โ No client-side credentials - Users don't need any tokens
- โ Automatic failover - Works even if one service is down
- โ Server-side only tokens - GITHUB_TOKEN never exposed to clients
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
Made with ๐ by andy64lol
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snakeer-1.0.0.tar.gz.
File metadata
- Download URL: snakeer-1.0.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33c8f08e8e204a195597bb0feca2b4b311f16d67da49500758425d0e94fc6151
|
|
| MD5 |
50a7e984cda5a7a683863053f83c0c2f
|
|
| BLAKE2b-256 |
ecd09e550d26a6a580d7f6c7455a818f7eab1d41acac74b3a51f8bcaba2cd47f
|
Provenance
The following attestation bundles were made for snakeer-1.0.0.tar.gz:
Publisher:
python-publish.yml on andy64lol/snakeer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snakeer-1.0.0.tar.gz -
Subject digest:
33c8f08e8e204a195597bb0feca2b4b311f16d67da49500758425d0e94fc6151 - Sigstore transparency entry: 957352423
- Sigstore integration time:
-
Permalink:
andy64lol/snakeer@c223170624f52c3ff6802ff7e8685c869866ee0b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/andy64lol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c223170624f52c3ff6802ff7e8685c869866ee0b -
Trigger Event:
release
-
Statement type:
File details
Details for the file snakeer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: snakeer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c8dc61bc8f28c20b35caf17c53816e66b103ef4fd6b3f8b690d1aabb12adf7d
|
|
| MD5 |
3c59706583d86a680f161c3754ac09ce
|
|
| BLAKE2b-256 |
b66bef048814a07f570e8e9ab7ef3a4a157bc525a41162558d70240a5867ca59
|
Provenance
The following attestation bundles were made for snakeer-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on andy64lol/snakeer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snakeer-1.0.0-py3-none-any.whl -
Subject digest:
4c8dc61bc8f28c20b35caf17c53816e66b103ef4fd6b3f8b690d1aabb12adf7d - Sigstore transparency entry: 957352431
- Sigstore integration time:
-
Permalink:
andy64lol/snakeer@c223170624f52c3ff6802ff7e8685c869866ee0b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/andy64lol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c223170624f52c3ff6802ff7e8685c869866ee0b -
Trigger Event:
release
-
Statement type: