Skip to main content

Python sample package with data

How to distribute a Python package with data.

https://stackoverflow.com/questions/3596979/manifest-in-ignored-on-python-setup-py-install-no-data-files-installed/60735402#60735402

Tested on Ubuntu 19.10, Python 3.7.5, wheel==0.32.3, setuptools==41.1.0, twine==3.1.1.

How end users use the package from https://pypi.org/project/python-sample-package-with-data/:

python3 -m pip install --user python-sample-package-with-data
python-sample-package-with-data

Expected output:

hello data

which are the contents of our test data file python_sample_package_with_data/mydata.txt that was distributed with pip.

How maintainers publish it:

# One time setup.
python3 -m pip install --user setuptools wheel twine

# Every time you want to publish.
python setup.py sdist bdist_wheel
twine upload dist/*
rm -rf build dist *.egg-info

Bibliography:

Release files for python-sample-package-with-data-aitirga 0.0.3

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

Source distribution (sdist)

Source distribution for python-sample-package-with-data-aitirga 0.0.3
File Size Uploaded
python-sample-package-with-data-aitirga-0.0.3.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-sample-package-with-data-aitirga 0.0.3
File Interpreter ABI Platform
python_sample_package_with_data_aitirga-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 kB

Release files / python-sample-package-with-data-aitirga-0.0.3.tar.gz

Download URL python-sample-package-with-data-aitirga-0.0.3.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a18945e002dfe8438e912cdeea61ce76323f5802201fc3c3e50d8dd35c15ad8a
BLAKE2b-256 checksum
How to use checksums
a7f5a1675084837d7ca3400f7a2c72b1767b24a7ce5d9c5912c780d92bd58794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.8.12

Release files / python_sample_package_with_data_aitirga-0.0.3-py3-none-any.whl

Download URL python_sample_package_with_data_aitirga-0.0.3-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76cfecec23664e1eaf3ceb53bd40af7b3ecf64fe6c2a8bfd9eb6b0f955f256de
BLAKE2b-256 checksum
How to use checksums
708f48fb0df95fddfd18273bf8ba9ed5c7f62521c48c0fc3566005cffaa21c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

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