Skip to main content

Minimal Python Project

Project description

img

A minimal python project. Features:

  • Create a binary using Pyinstaller
  • GitHub Actions adds binaries to releases
  • Correctly handle data files

Installation Options

1. Build from source (requires Python 3.8+)

Clone this project locally and then run:

pip install .

Or, create a binary, which creates an executable file at ./dist/py-demo:

make binary

2. Download binary from a release

Head over to the releases page and grab a binary. Or, to programmatically fetch the latest release (say, for MacOS):

repoUrl=https://api.github.com/repos/cfclrk/py-demo
assetId=$(curl -s $repoUrl/releases/latest \
    | jq '.assets[] | select(.name | contains("Darwin")).id')
curl -sSL -H "Accept: application/octet-stream" \
    $repoUrl/releases/assets/$assetId -o py-demo
chmod +x py-demo

Example

After installing, run either py-demo (if installed from source) or ./py-demo (if installed as a binary).

py-demo --foo bar

The version of this package is: 0.0.9
The data file says: This is some text
The value of foo is: bar

And it has a --version flag:

py-demo --version

0.0.9

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

py_demo-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file py_demo-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: py_demo-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for py_demo-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 185bcb368b741fd28e53182bf3c947c7c4116f89177121487193779ed1248603
MD5 a442c07412b22f82c6391809415a6c99
BLAKE2b-256 d51d23c6d5e750c709214272b50b4be79f1960a5da8fae0a1c761972a747ac69

See more details on using hashes here.

Supported by

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