Common Python utility modules
Project description
common-util-py
Common utilities in Python
How to install
The following commands show how to install common-util-py using pip within a Python virtual environment. To see which versions of Python are supported by common-util-py, see (here)[#tested-installation-via-pypi-on-the-following-python-versions].
$ python3 -m venv py313_env
$ source py313_env/bin/activate
$ pip install .[dev]
$ # or
$ virtualenv --python=/usr/bin/python3 py39_env
$ source env_py39/bin/activate
$ pip install .
$ # or
$ python3.8 -m venv env_py38
$ source env_py38/bin/activate
$ pip install .
How to build
To create a source distribution, run the following commands:
$ source py313_env/bin/activate
$ python3 setup.py --help-commands
$ python3 setup.py sdist
How to test
Initially we were using nosetests and have since migrated to pytest.
$ # deprecated
$ # python setup.py test
$ # python setup.py nosetests
$ # nose is replace by pytest since python3.13
$ pytest
read more here
- https://www.codingforentrepreneurs.com/blog/pipenv-virtual-environments-for-python/
- https://packaging.python.org/
- https://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/
How to upload to PyPI (Python Package Index)
First, build a source distribution and then install the twine package.
$ python setup.py sdist
$ pip install twine
Then, use twine to upload the package to PyPI.
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
or
$ twine upload --config-file ~/.pypirc -r testpypi dist/common_util_py-0.0.1.tar.gz
Test install
Install from Test PyPI
$ pip install --index-url https://test.pypi.org/simple/ common-util-py
Install from Local Distribution.
$ pip install dist/common_util_py-<version>.tar.gz
Legacy
To generate requirements.txt and requirements-dev.txt from pyproject.toml, run the following command.
pip install pip-tools
pip-compile --extra dev pyproject.toml -o requirements-dev.txt
pip-compile pyproject.toml -o requirements.txt
Tested installation via PyPI on the following Python versions:
| Python Version | tested installed |
|---|---|
| 3.9 | Yes |
| 3.10 | Yes |
| 3.11 | Yes |
| 3.12 | Yes |
| 3.13 | Yes |
| 3.14 | Upcoming |
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 common_util_py-0.0.28.tar.gz.
File metadata
- Download URL: common_util_py-0.0.28.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee4c02b73d031e19d20ca2ee82da4de53b3c6cc8ca64266ebaccdafe2b97eab
|
|
| MD5 |
5abc66687fa9f1c2712b57badd39a8fc
|
|
| BLAKE2b-256 |
cb9f4a50945c457459e6e5c173200072701c9083a9c97bdf5fae6cf7a857e1cd
|
Provenance
The following attestation bundles were made for common_util_py-0.0.28.tar.gz:
Publisher:
python-publish.yml on jasonwee/common-util-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
common_util_py-0.0.28.tar.gz -
Subject digest:
cee4c02b73d031e19d20ca2ee82da4de53b3c6cc8ca64266ebaccdafe2b97eab - Sigstore transparency entry: 367111989
- Sigstore integration time:
-
Permalink:
jasonwee/common-util-py@6e22c4c501a6b0804f13c8a35e0a0dc9fedc1bfd -
Branch / Tag:
refs/tags/v0.0.28 - Owner: https://github.com/jasonwee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6e22c4c501a6b0804f13c8a35e0a0dc9fedc1bfd -
Trigger Event:
release
-
Statement type:
File details
Details for the file common_util_py-0.0.28-py3-none-any.whl.
File metadata
- Download URL: common_util_py-0.0.28-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f32b43850b28070137fda5753c0660664c3c1db876e4f36b5e7b940aae0760c
|
|
| MD5 |
5dc82d74fabb14de36623b871c6caf48
|
|
| BLAKE2b-256 |
51b4e641c839dad8382f362204b69146c97ffe932a8494d42cacd1ea6ca65576
|
Provenance
The following attestation bundles were made for common_util_py-0.0.28-py3-none-any.whl:
Publisher:
python-publish.yml on jasonwee/common-util-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
common_util_py-0.0.28-py3-none-any.whl -
Subject digest:
1f32b43850b28070137fda5753c0660664c3c1db876e4f36b5e7b940aae0760c - Sigstore transparency entry: 367111999
- Sigstore integration time:
-
Permalink:
jasonwee/common-util-py@6e22c4c501a6b0804f13c8a35e0a0dc9fedc1bfd -
Branch / Tag:
refs/tags/v0.0.28 - Owner: https://github.com/jasonwee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6e22c4c501a6b0804f13c8a35e0a0dc9fedc1bfd -
Trigger Event:
release
-
Statement type: