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:
- Create an account on PyPI or TestPyPI
- Configure your credentials (use API tokens for better security)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a73fe59b03825c5592ed606531df9f170e977643a5c3efc48a249f6f27e690
|
|
| MD5 |
c1afb99425b09ee5c04d150a3931b01e
|
|
| BLAKE2b-256 |
e91daf0e0d7624a8bf5b42492213b48a9599053bb938b6f4bd7efb74e0db314b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb4bd8174e90d1803b1ce9471d0e7cca65a5fed34f2b1d8445670cb718469bde
|
|
| MD5 |
4a021d47a04a3d07d9dc63ecdc55ceed
|
|
| BLAKE2b-256 |
99748c4278de630acab1be69f52a6c090f264fab1e29cbe01c6ccd791d4422e7
|