Install your custom python modules into any python environment without setup.py, pyproject.toml, or any other typical python packaging setup
Project description
nopkg
Install your custom python modules into any python environment without setup.py, pyproject.toml, or any other typical python packaging setup.
Use For:
- Personal scripts and utilities
- Prototyping, evaluating the usefulness of a module before putting the effort into packaging
- Sharing small utilities with your team, without maintaining a proper pip package or hosting an internal pip repository
Install python files as importable modules
Install a single Python file as a module:
nopkg install mymodule.py
Install multiple modules using glob patterns:
nopkg install *.py # Install all .py files
nopkg install utils/*.py # Install all .py files in utils/
nopkg install one.py two.py three.py # Install specific files
Install a directory as a package (will create __init__.py if needed):
nopkg install mypackage/
Note: If you run nopkg install on a module or package that's already installed by nopkg, it will automatically update it instead of giving an error.
Use it in python:
from mymodule import hello
from mypackage import utils
hello("I just installed a module without any setup!")
Works with virtual environments
# Create and activate virtual environment
python -m venv myenv
source myenv/bin/activate # On Windows: myenv\Scripts\activate
# Install your module
nopkg install mymodule.py
# Use it in your virtual environment
python -c "from mymodule import hello; hello('Virtual env works!')"
Development mode installs
Install your python file(s) as an importable module, and keep them exactly where they are. Changes to your files will take effect immediately without any re-installing.
nopkg install -e mymodule.py
nopkg install --dev mypackage/
Managing Installed Modules
List installed modules
nopkg list
Show module information
nopkg info mymodule
Update an installed module
nopkg update mymodule
Remove an installed module
nopkg uninstall mymodule
Remove multiple modules using patterns
nopkg uninstall 'test_*' # Remove all modules starting with 'test_'
nopkg uninstall '*' # Remove all installed modules
Installation
pip install nopkg
How it works
nopkg installs modules and packages directly into Python's site-packages directory. It's much simpler than pip and works in one of two ways:
- Development mode (
-eor--dev): Creates a.pthfile in site-packages that points to your module's location. Changes to your files are immediately available without reinstalling. - Copy mode (default): Copies your source files directly into site-packages.
nopkg maintains a simple registry file (~/.nopkg/registry.txt) to track installations, enabling the list, info, update, and uninstall commands.
All this means:
- No
setup.pyrequired - No
pyproject.tomlneeded - No wheel building
Limitations:
- Cannot publish to PyPI (still need setup.py or pyproject.toml for that)
- No dependency management - you must manually ensure dependencies are installed
- Only works with local files and directories (no URL installation)
- Package directories are copied entirely, preserving all resource files and assets
nopkg is intended as a tool for personal utility management and prototyping, as well as sharing of ad-hoc utility modules within a team. nopkg is NOT intended as a pip replacement or production package management solution. It is a bridge that lets you get going quickly.
Available Commands
nopkg install <sources...> # Install modules/packages (supports glob patterns)
nopkg install -e <sources...> # Install in development mode
nopkg list # List installed modules
nopkg info <module> # Show module information
nopkg update <module> # Update an installed module
nopkg uninstall <modules...> # Remove installed modules (supports glob patterns)
Note: The core functionality supports specifying different Python interpreters, but the CLI doesn't expose this feature yet.
Future Features (Contributions Welcome!)
- URL Installation:
nopkg install https://raw.githubusercontent.com/user/repo/main/utils.py - CLI Python Interpreter Selection:
nopkg install mymodule --python /path/to/python - Environment Management:
nopkg env current,nopkg env use /path/to/python - Package Bootstrapping:
nopkg pipify mymodule.py- Setup boilerplate for full Python packaging and PyPI publishing - Dependency Detection: Automatically detect and warn about missing dependencies
License
MIT
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 nopkg-0.3.0.tar.gz.
File metadata
- Download URL: nopkg-0.3.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e49e263e43d9b3b300749a7d6ee658a54da76cad19003d21ae624307a8cbece
|
|
| MD5 |
46f0d34984a27bf879b5936ef1fba17d
|
|
| BLAKE2b-256 |
a44e3c4f1b7c47ebe712ebd3a3efd904774033047823e792cf1060b52afa5a0f
|
Provenance
The following attestation bundles were made for nopkg-0.3.0.tar.gz:
Publisher:
pypi-publish.yml on BlakeASmith/nopkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopkg-0.3.0.tar.gz -
Subject digest:
0e49e263e43d9b3b300749a7d6ee658a54da76cad19003d21ae624307a8cbece - Sigstore transparency entry: 584155879
- Sigstore integration time:
-
Permalink:
BlakeASmith/nopkg@ef5696d14d80d17ff0f1e9015e79f5d45e869d59 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BlakeASmith
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@ef5696d14d80d17ff0f1e9015e79f5d45e869d59 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nopkg-0.3.0-py3-none-any.whl.
File metadata
- Download URL: nopkg-0.3.0-py3-none-any.whl
- Upload date:
- Size: 16.4 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 |
66ac26cace6a3681ab07b0bc44f5afb02d3f16f39bafa74240901b7f1d6889d8
|
|
| MD5 |
58edb60ba420509a6bcb19dbe52913ba
|
|
| BLAKE2b-256 |
d61970e4d8ea5443a440cd31b8a94d997fe9d60696f93e60cefa0fd1bce99a64
|
Provenance
The following attestation bundles were made for nopkg-0.3.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on BlakeASmith/nopkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopkg-0.3.0-py3-none-any.whl -
Subject digest:
66ac26cace6a3681ab07b0bc44f5afb02d3f16f39bafa74240901b7f1d6889d8 - Sigstore transparency entry: 584155885
- Sigstore integration time:
-
Permalink:
BlakeASmith/nopkg@ef5696d14d80d17ff0f1e9015e79f5d45e869d59 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BlakeASmith
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@ef5696d14d80d17ff0f1e9015e79f5d45e869d59 -
Trigger Event:
push
-
Statement type: