Skip to main content

Practice creating Packages

Steps:

  • Create 'script'.py, put in src dir inside project directory
  • Create setup.py in project dir.
  • run: python 'script'.py bdist_wheel (Create package from script.py using setup.py as config)
  • run: pip install -e . (Install package in current directory)
  • test script: from 'script' import 'funcname' ... call function
  • Choose a license https://choosealicense.com/ and create LICENSE.txt file
  • Add classifiers to setup.py file https://pypi.org/classifiers/
  • Add a README.md describing project, how to install (with reqs), usage
  • Add README to setup.py file as long_description
  • Add library dependencies to setup.py as install_requires, and developer dependencies as extras_require (requirements.txt is an alternative to this, but setup.py recommended)
  • Test files in test directory, run pytest
  • Optional: url and author in setup.py
  • run py setup.py sdist (For source distribution)
  • Publish package: py setup.py bdist_wheel sdist
  • Push to PyPI: twine upload dist/*

Metadata

Release files for helloworld-danlh 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helloworld-danlh 0.0.1
File Size Uploaded Provenance Actions
helloworld-danlh-0.0.1.tar.gz 2.7 kB Without provenance Details for helloworld-danlh-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helloworld-danlh 0.0.1
File Interpreter ABI Platform Actions
helloworld_danlh-0.0.1-py3-none-any.whl Python 3 none any Details for helloworld_danlh-0.0.1-py3-none-any.whl

Total release size: 5.5 kB

Release files / helloworld-danlh-0.0.1.tar.gz

Download URL helloworld-danlh-0.0.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f225dc5595e29059dc1e36bb0cc139cd6d8f0294f7d73059f4e84c2047d35572
BLAKE2b-256 checksum
How to use checksums
b963220073bf96603b6472202fc7dbb86c496932be409ff0b859ad2844e6d807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / helloworld_danlh-0.0.1-py3-none-any.whl

Download URL helloworld_danlh-0.0.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8081419db38c907215bda1e43eb242c8696027c4fa31aa54cad6c8207c0b1bc1
BLAKE2b-256 checksum
How to use checksums
ad7e31034ce420a9bf8156d4ff7bc62e4c4c16326a46eafdd8d88fd281db3d10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for helloworld-danlh 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page