Skip to main content

Minimal PyPI Package Example

Project description

# min-pypi-hello

A minimalist example of PyPI packaging.
[view on pypi](;
[view on GitHub](

* A package called `minpypihello`,
which contains a module called `modhello`.
You can import using `from minpypihello import modhello`.
* A script that can be executed directly to print a helloworld message.

## 1. Check the Project and Study Files

Run `./myhello` and see if it works as expected.
Navigate under this repo and see those files for an example layout.

├── README.txt
├── minpypihello
│   ├──
│   └──
├── myhello

## 2. Package

Build source archive: `python sdist`.


* Find your package in `dist/minpypihello-x.tar.gz`,
where `x` is the version number.
* Uncompress the archive and go to its root.
* Install `python install`.
You can add `--user` to install under your home.
* Try `myhello` (not `./myhello`).
If you `$PATH` is set properly and the install is successful,
you should see the printed hello message.
* Try to import `minpypihello.modhello` from a Python script
(see code of `myhello` for an example).

## 3. Distribute to PyPI

Register: Use `python register` and go through the procedure as prompt.

Upload: `python sdist upload`.

[more info.](

## Reference

* distutils:
* A list of package metadata:

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
minpypihello-1.5.tar.gz (1.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page