A collection of utilities used across multiple BIG projects
Project description
A collection of useful utilities shared a cross a number of Bits In Glass projects.
What is this repository for?
This repository a collection of useful, common utilities used over and over again in a number of BIG projects.
How do I get set up?
This is a library to be included in other projects.
Dependencies should be installed automatically, but here is the pip
command for those who like to do things manually:
pip install --upgrade pyjwt pytest pytest-mock wheel
Alternatively, run this command:
pip install --upgrade -r requirements.txt
To run unit tests (using pytest
), execute the following command:
pytest -v tests/*
Publishing to PyPI
Important Note: The procedure is adopted from an excellent article on Real Python.
To upload our package to PyPI, use a tool called Twine
. We can install Twine using pip
as usual:
pip install twine
Building the Package
To create a source archive and a wheel for our package, run the following command:
python setup.py sdist bdist_wheel
This will create two files in a newly created dist directory, a source archive, and a wheel:
Twine (1.12.0 and above) can also check that our package description will render properly on PyPI. Run twine check on the files created in dist
:
twine check dist/*
While it won’t catch all problems we might run into, it will for instance let us know if we are using the wrong content type.
Uploading the Package
Now we’re ready to actually upload our package to PyPI. For this, we’ll again use the twine
tool, telling it to upload the distribution packages we have built. First, we should upload to TestPyPI to make sure everything works as expected:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Twine will ask you for our username and password, which can be found in the LastPass.
NOTE: The TestPyPI password is different from the actual PyPI.
If the upload succeeds, we can quickly head over to TestPyPI, scroll down, and look at our project being proudly displayed among the new releases! Click on our package and make sure everything looks okay.
With all the preparations taken care of, this final step is short:
twine upload dist/*
Provide our username and password when requested. That’s it!
Head over to PyPI and look up our package - big-utils
. We can find it either by searching, by looking at the Your projects page, or by going directly to the URL of our project.
Project details
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
Hashes for big_utils-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b55d19edcb44a86944d1f176c8dc439e69223642a4957ede0ce6f3b9a865e84b |
|
MD5 | 179bcbb88ec0ad0626c7b3e16312075b |
|
BLAKE2b-256 | e43949a8254038c71b6377892a5fefae620606f0a74d141515d0632892b676de |