Example package published with markpact
Project description
PyPI Publish Example
Przykład publikacji paczki Python do PyPI bezpośrednio z README.
git clone https://github.com/wronai/markpact.git
Użycie
# Podgląd bez publikacji
markpact examples/pypi-publish/README.md --publish --dry-run
# Publikacja do TestPyPI
markpact examples/pypi-publish/README.md --publish --registry pypi-test
# Publikacja do PyPI z bump wersji
markpact examples/pypi-publish/README.md --publish --bump patch
# Publikacja do PyPI (produkcja)
markpact examples/pypi-publish/README.md --publish
Konfiguracja
Upewnij się, że masz skonfigurowany ~/.pypirc:
[pypi]
username = __token__
password = pypi-xxxx
[testpypi]
username = __token__
password = pypi-xxxx
publishing:
markpact examples/pypi-publish/README.md --publish
output:
[markpact] Parsing examples/pypi-publish/README.md
[markpact] wrote /home/tom/github/wronai/markpact/sandbox/markpact_example_pypi/__init__.py
[markpact] wrote /home/tom/github/wronai/markpact/sandbox/markpact_example_pypi/cli.py
[markpact] Bumped version to 0.1.7
[markpact] Publishing markpact-example-pypi v0.1.7 to PyPI...
[markpact] Building package...
[markpact] Uploading to PyPI...
[markpact] Found ~/.pypirc at: /home/tom/.pypirc
[markpact] ~/.pypirc section [pypi] parsed:
username = __token__
password = pypi-AgE...
[markpact] Running twine command:
/home/tom/miniconda3/bin/python3 -m twine upload --config-file /home/tom/.pypirc --verbose dist/*
[markpact] ✓ Published to PyPI
[markpact] Version: 0.1.7
[markpact] URL: https://pypi.org/project/markpact-example-pypi/
[markpact] Updated version in examples/pypi-publish/README.md
published project: https://pypi.org/project/markpact-example-pypi/
registry = pypi
name = markpact-example-pypi
version = 0.1.12
description = Example package published with markpact
author = Your Name
license = MIT
keywords = example, markpact, demo
repository = https://github.com/your/repo
"""Example package published with markpact"""
__version__ = "0.1.0"
def hello(name: str = "World") -> str:
"""Say hello to someone."""
return f"Hello, {name}!"
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
"""CLI for example package"""
import argparse
from . import hello, add
def main():
parser = argparse.ArgumentParser(description="Example CLI")
parser.add_argument("--name", default="World", help="Name to greet")
parser.add_argument("--add", nargs=2, type=int, help="Add two numbers")
args = parser.parse_args()
if args.add:
result = add(args.add[0], args.add[1])
print(f"{args.add[0]} + {args.add[1]} = {result}")
else:
print(hello(args.name))
if __name__ == "__main__":
main()
# No HTTP tests for CLI package
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 markpact_example_pypi-0.1.15.tar.gz.
File metadata
- Download URL: markpact_example_pypi-0.1.15.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da4607038729787e877f58e03e43eba736faebefd1fb8afa17e2187ca7e97c6
|
|
| MD5 |
db3aa716d3294bb5a2b4df351b9125c8
|
|
| BLAKE2b-256 |
351c7e9ca8f6830936887fee2ed65e7d01f1587a9aa77df9a81504d69e833cff
|
File details
Details for the file markpact_example_pypi-0.1.15-py3-none-any.whl.
File metadata
- Download URL: markpact_example_pypi-0.1.15-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d3157cf74f854371ee90691e9aa4ffd6980bb80801767a83310880759b6d2b
|
|
| MD5 |
6e85b0561276de8a66da80a98a4409a8
|
|
| BLAKE2b-256 |
fbbe1a58f36838d2cb8e7b7fdfccd1bb214d038ab24734b94e7c36fa45101940
|