import-ready
This repository demonstrates steps needed to publish an importable Python package first to TestPyPI, and second to PyPI. If this demonstration deviates from best practice in any way, please submit an issue on GitHub.
Inside import-ready is a package called huntsville_havoc that divulges a couple of bona fide secrets that most diehard SPHL Huntsville Havoc fans don't know.
Prepare the Package
- Prepare your environment before installing Python packages.
- Update version in setup.py per semantic versioning guidance.
Test in Development Environment
Run as follows from the top level directory in a clean venv with pip-tools installed:
python -m piptools compile --generate-hashes --allow-unsafe dev-requirements.in dos2unix dev-requirements.txt python -m pip install -r dev-requirements.txt python -m pytest -s tests
Publish to TestPyPI
- Git commit, tag, & push all desired edits for release.
- Create a new release in GitHub to mirror your new version.
- Generate distribution archives for your package.
- Upload your package to TestPyPI.
Test the TestPyPI Published Package
Run as follows from some random directory (to prove to yourself you're not "cheating" with some locally obtained import-ready) in another clean venv with pip-tools installed:
cp <path to import-ready>/tests/origins_test.py . cp <path to import-ready>/tests/pubtest-requirements.in . python -m piptools compile --generate-hashes pubtest-requirements.in dos2unix pubtest-requirements.txt python -m pip install -r pubtest-requirements.txt python -m pytest -s
Publish to PyPI
After completing the above steps, upload your package to PyPI.
Test the real deal
Post-publish test, importing import-ready itself back from PyPI. Run as follows from some other random directory (same reason as for TestPyPI testing above) in yet another clean venv with pip-tools installed:
cp <path to import-ready>/tests/origins_test.py . cp <path to import-ready>/tests/pub-requirements.in . python -m piptools compile --generate-hashes pub-requirements.in dos2unix pub-requirements.txt python -m pip install -r pub-requirements.txt python -m pytest -s
Thanks
License
MIT.
Metadata
Release files for import-ready 0.10.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| import-ready-0.10.3.tar.gz | 3.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| import_ready-0.10.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / import-ready-0.10.3.tar.gz
| Download URL | import-ready-0.10.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bd4723991fa4ddb333fd3d7f0ba448a7353a7a09c28cd444de9b1b4e4ed6c63
|
|
BLAKE2b-256 checksum How to use checksums |
17cfb783a08c0b57748b896f72172063b5c8ad83333595e787cb2c5cf6d50099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / import_ready-0.10.3-py3-none-any.whl
| Download URL | import_ready-0.10.3-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b315d7609357e93573c671312dc6032ac9c3a94f26b9e4c155ae8d056bb34e46
|
|
BLAKE2b-256 checksum How to use checksums |
5b8deff95a7584973542d00dab4cd770a0a7c7c31a6219020b105b5db3a40724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for import-ready 0.10.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.