AZPyPkg
AZ Learning Package
Set up
- Install envrionment manager: Anaconda(Or even smaller package of Miniconda)
- Install packages:
poetryandcookiecutter - Register for TestPyPI and PyPI
- Register for GitHub
- Install Python extensions in VSCode
Main
-
Create a new virtual env by Anaconda and make it enable in VSCode to working directory locally
-
Create a new package structure by below command and input a few info.
git initthe new foldercookiecutter https://github.com/py-pkgs/py-pkgs-cookiecutter.git -
Create a new project in GitHub, link new package to remote repos. Commit and push:
-
Add new code as function into file 'azpypkg36':
-
Install current new package:
poetry install -
Test new installed package:
Create test file 'zen.txt':
python -c "import this" > zen.txtTest with Python Command:
Test with tests .py file:
-
Create tests in 'tests' directory and run test:
pytest tests/Install 'pytest' into project:poetry add --dev pytestCreate unit test code: KEY: both file name and function name, must include 'test_XXX' or 'XXX_test'
Run unit test:
-
Check code coverage:
Install 'pytest' into project:
poetry add --dev pytest-covRun test coverage:
pytest tests/ --cov=azpypkg36 -
Documentation:
-
Add version:
git tag+git push --tagsafter regulargit commitandgit push -
Release on github:
-
Build package: the main reason for build is to generate a a wheel(.whl file) can be distributed
poetry build -
Install locally:
cd dist+pip install azpypkg36-0.1.0-py3-none-any.whl -
Publish package:
-
Publish to 'TestPyPI' & install by pip (pip uninstall first before testing):
Publish:
poetry config repositories.test-pypi https://test.pypi.org/legacy/poetry publish -r test-pypi  Install:
pip install -i https://test.pypi.org/simple/ azpypkg36 -
Publish to 'PyPI' & install by pip (pip uninstall first before testing):
Publish:
poetry publishInstall:
pip install azpypkg36
-
More details steps:
Metadata
Release files for azpypkg36 0.1.0
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 | |
|---|---|---|---|---|
| azpypkg36-0.1.0.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azpypkg36-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / azpypkg36-0.1.0.tar.gz
| Download URL | azpypkg36-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4515d4712bfdfa23af4d08219a41dc02f610c387cf690825812d138dbaeb9e80
|
|
BLAKE2b-256 checksum How to use checksums |
c4dcfbf4b69d5f1672ecf715eafdf5f1ea8c61c3754f9bf074d179cc942737c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.9.4 Windows/10
|
Release files / azpypkg36-0.1.0-py3-none-any.whl
| Download URL | azpypkg36-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3103ceee1b9d482c23744fc551286142b285c619320e08eaca4309f2f0b4c838
|
|
BLAKE2b-256 checksum How to use checksums |
bfb73bcb87c4f0cdc0aa0daf802f4fdb598e9edcac7e54de8919572af4130481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.9.4 Windows/10
|
Security for azpypkg36 0.1.0
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.