Skip to main content

API for inspecting and creating .whl files

Project description

Wheelfile 🔪🧀

This library aims to make it dead simple to create a format-compliant .whl file (wheel). It provides an API comparable to zipfile. Use this if you wish to inspect or create wheels in your code.

For a quick look, see the example on the right, which packages the wheelfile module itself into a wheel 🤸.

What's the difference between this and wheel?

"Wheel" tries to provide a reference implementation for the standard. It is used by setuptools and has its own CLI, but no stable API. The goal of Wheelfile is to provide a simple API.

Wheelfile does not depend on Wheel.

Acknowledgements

Thanks to Paul Moore for providing his gist of basic metadata parsing logic, which helped to avoid many foolish mistakes in the initial implementation.




pip install wheelfile
from wheelfile import WheelFile, __version__

spec = {
    'distname': 'wheelfile',
    'version': __version__
}

requirements = [
    'packaging >= 20.8',
]

with WheelFile(mode='w', **spec) as wf:
    wf.metadata.requires_dists = requirements
    wf.write('./wheelfile.py')

# 🧀

More examples: buildscript | PEP-517 builder

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

wheelfile-0.0.9-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file wheelfile-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: wheelfile-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for wheelfile-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 120b742a8b2e954e2b8d954507fe747124350fb06ae5b9d3850ad83fd7e6fa7c
MD5 4b3a57cf1b850d336ce7fafdf079364f
BLAKE2b-256 81830e2c652cb35427594350cd0733ec448a6c202d3b26442b7ef39fb8600057

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page