# =============================================================================
# PyPI Configuration
# https://packaging.python.org/en/latest/specifications/pypirc/
# =============================================================================
#
# This file is portable - copy to other repos without modification.
#
# Defines package index servers for uploading Python packages.
# This file should NOT contain credentials - store them securely:
#
# Authentication methods (in order of preference):
#   1. API tokens via environment variables (CI/CD)
#      export TWINE_USERNAME=__token__
#      export TWINE_PASSWORD=pypi-xxxxx
#
#   2. System keyring (recommended for local dev)
#      keyring set https://upload.pypi.org/legacy/ __token__
#
#   3. ~/.pypirc in home directory (not in repo)
#      [pypi]
#      username = __token__
#      password = pypi-xxxxx
#
# Upload commands:
#   poetry publish                           # Uses Poetry's config
#   twine upload dist/* -r pypi              # Upload to PyPI
#   twine upload dist/* -r testpypi          # Upload to TestPyPI
#   twine upload dist/* -r cloudsmith        # Upload to Cloudsmith
#
# =============================================================================


# =============================================================================
# Index Server Registry
# =============================================================================
#
# List all available package indexes. Use with: twine upload -r <name>
#
# =============================================================================

[distutils]
index-servers =
    pypi
    testpypi
    cloudsmith
    gitlab
    github


# =============================================================================
# PyPI (Production)
# =============================================================================
#
# The official Python Package Index.
# Create API token: https://pypi.org/manage/account/token/
#
# Upload: twine upload dist/* -r pypi
#
# =============================================================================

[pypi]
repository = https://upload.pypi.org/legacy/


# =============================================================================
# TestPyPI (Staging)
# =============================================================================
#
# Test your package uploads before releasing to production.
# Create API token: https://test.pypi.org/manage/account/token/
#
# Upload: twine upload dist/* -r testpypi
# Install: pip install -i https://test.pypi.org/simple/ <package>
#
# =============================================================================

[testpypi]
repository = https://test.pypi.org/legacy/


# =============================================================================
# Cloudsmith (Private Registry)
# =============================================================================
#
# Private package hosting for internal packages.
# Get API key: https://cloudsmith.io/user/settings/api/
#
# Upload: twine upload dist/* -r cloudsmith
#
# =============================================================================

[cloudsmith]
repository = https://python.cloudsmith.io/starling/sturnus/


# =============================================================================
# GitLab Package Registry
# =============================================================================
#
# GitLab's built-in package registry.
# Replace <project_id> with your GitLab project ID.
# Use deploy token or personal access token for auth.
#
# Upload: twine upload dist/* -r gitlab
#
# =============================================================================

[gitlab]
repository = https://gitlab.com/api/v4/projects/<project_id>/packages/pypi


# =============================================================================
# GitHub Package Registry
# =============================================================================
#
# GitHub Packages for Python (via PyPI-compatible endpoint).
# Use personal access token with write:packages scope.
#
# Note: GitHub doesn't have native PyPI hosting; this points to PyPI.
# For GitHub Packages, use: https://docs.github.com/en/packages
#
# =============================================================================

; [github]
; repository = https://upload.pypi.org/legacy/
