Skip to main content

A sample Python package that can be uploaded to PyPI

Project description

ZSZ Package

A sample Python package demonstrating how to create a package that can be uploaded to PyPI.

Features

  • Simple and easy to use
  • Well-documented code
  • Comprehensive test coverage
  • Ready for PyPI distribution

Installation

From PyPI (once published)

pip install zsz-package

From source

git clone https://github.com/yourusername/zsz-package.git
cd zsz-package
pip install -e .

Usage

As a Python library

from zsz_package import hello, Calculator

# Say hello
hello("World")

# Use the calculator
calc = Calculator()
result = calc.add(5, 3)
print(f"Result: {result}")

Command-line interface

zsz-hello

Development

Setup development environment

# Clone the repository
git clone https://github.com/yourusername/zsz-package.git
cd zsz-package

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

Run tests

pytest

Code formatting

black src/ tests/

Type checking

mypy src/

Building and Publishing

Build the package

# Install build tools
pip install build twine

# Build the package
python -m build

This will create distribution files in the dist/ directory:

  • zsz_package-0.1.0.tar.gz (source distribution)
  • zsz_package-0.1.0-py3-none-any.whl (wheel distribution)

Test the package locally

# Install from local wheel
pip install dist/zsz_package-0.1.0-py3-none-any.whl

Upload to TestPyPI (for testing)

# Upload to TestPyPI
python -m twine upload --repository testpypi dist/*

# Test installation from TestPyPI
pip install --index-url https://test.pypi.org/simple/ zsz-package

Upload to PyPI (production)

# Upload to PyPI
python -m twine upload dist/*

Note: You need to:

  1. Create an account on PyPI or TestPyPI
  2. Configure your credentials (use API tokens for better security)
  3. Ensure your package name is unique on PyPI

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Your Name - your.email@example.com

Changelog

0.1.0 (2026-01-02)

  • Initial release
  • Basic calculator functionality
  • Hello world function
  • Command-line interface

Project details


Download files

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

Source Distribution

zsz_package-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zsz_package-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file zsz_package-0.1.0.tar.gz.

File metadata

  • Download URL: zsz_package-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for zsz_package-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e6a73fe59b03825c5592ed606531df9f170e977643a5c3efc48a249f6f27e690
MD5 c1afb99425b09ee5c04d150a3931b01e
BLAKE2b-256 e91daf0e0d7624a8bf5b42492213b48a9599053bb938b6f4bd7efb74e0db314b

See more details on using hashes here.

File details

Details for the file zsz_package-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zsz_package-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for zsz_package-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb4bd8174e90d1803b1ce9471d0e7cca65a5fed34f2b1d8445670cb718469bde
MD5 4a021d47a04a3d07d9dc63ecdc55ceed
BLAKE2b-256 99748c4278de630acab1be69f52a6c090f264fab1e29cbe01c6ccd791d4422e7

See more details on using hashes here.

Supported by

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