Metadata-Version: 2.4
Name: my-py-private-lib
Version: 0.1.0
Summary: A small example Python library.
License-Expression: MIT
License-File: LICENSE
Keywords: example,library
Author: tharhtetsan
Author-email: tharhtetsan.ai@gmail.com
Requires-Python: >=3.12
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Project-URL: Homepage, https://github.com/tharhtetsan/my-py-private-lib
Project-URL: Issues, https://github.com/tharhtetsan/my-py-private-lib/issues
Project-URL: Repository, https://github.com/tharhtetsan/my-py-private-lib
Description-Content-Type: text/markdown

# my-py-private-lib

A small example Python library, published to PyPI.

## Release workflow

Releases are automated. Pushing a tag that matches `v*` triggers
`.github/workflows/publish.yml`, which builds the package and uploads it
to PyPI.

### One-time setup

1. Create a PyPI account: https://pypi.org/account/register/
2. Create an API token: https://pypi.org/manage/account/token/
   (scope "Entire account" for the first release; narrow it to this
   project afterwards.)
3. In the GitHub repo, add the token as a secret named `PYPI_API_TOKEN`
   (Settings → Secrets and variables → Actions → New repository secret).

### Cutting a release

```bash
# 1. Bump the version in pyproject.toml (e.g. 0.1.0 -> 0.1.1).
# 2. Commit and push to main.
git commit -am "Release v0.1.1"
git push

# 3. Tag and push the tag — this triggers the workflow.
git tag v0.1.1
git push origin v0.1.1
```

PyPI versions are immutable: once published, that exact version number
can never be reused, even after deletion. Always bump before tagging.

## Local publishing (manual, optional)

```bash
poetry config pypi-token.pypi <your-pypi-token>
poetry build
poetry publish
```

## Trial runs with TestPyPI

To verify the release pipeline without burning a real version on PyPI:

```bash
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi <your-testpypi-token>
poetry publish -r testpypi
```

Install from TestPyPI:

```bash
pip install -i https://test.pypi.org/simple/ my-py-private-lib
```

## Installation

```bash
pip install my-py-private-lib
```

## Usage

```python
from my_py_private_lib import hello

print(hello("Thar San"))
```

