Python

CloudRepo supports the full Python packaging ecosystem with multiple tools and workflows.

Overview

CloudRepo provides comprehensive Python package hosting with support for both traditional and modern Python packaging tools. Whether you’re using pip, Poetry, uv, or conda, CloudRepo seamlessly integrates with your workflow.

Supported Package Formats

  • Wheels (.whl) - Binary distribution format

  • Source distributions (.tar.gz) - Source code packages

  • Eggs (.egg) - Legacy format (supported but not recommended)

  • Conda packages (.tar.bz2) - Conda/mamba format

Supported Tools

Traditional Tools

  • pip - The standard Python package installer

  • setuptools - Build backend for Python packages

  • twine - Upload packages to CloudRepo

Modern Tools

  • Poetry - Modern dependency management and packaging

  • uv - Extremely fast Python package installer (Rust-based)

  • pipenv - Python development workflow tool

  • pdm - Modern Python package manager with PEP 582 support

Scientific Computing

  • conda - Cross-platform package manager

  • mamba - Fast drop-in conda replacement

  • pixi - Modern conda package management

Repository Types

PyPI-Compatible Repositories

CloudRepo provides PEP 503-compliant simple index repositories:

https://[org-id].cloudrepo.io/repository/pypi/simple

Features:

  • Compatible with all pip-based tools

  • HTML simple index for package discovery

  • Support for pre-releases and development versions

  • Platform-specific wheel hosting

Conda Channels

CloudRepo can host conda channels for scientific packages:

https://[org-id].cloudrepo.io/repository/conda

Features:

  • Standard conda channel layout

  • Support for multiple platforms

  • Compatible with conda, mamba, and pixi

  • Repodata.json generation

Quick Configuration Examples

pip

pip install package-name \
  --index-url https://[org-id].cloudrepo.io/repository/pypi/simple

Poetry

[[tool.poetry.source]]
name = "cloudrepo"
url = "https://[org-id].cloudrepo.io/repository/pypi/simple"
priority = "primary"

uv

uv pip install package-name \
  --index-url https://[org-id].cloudrepo.io/repository/pypi/simple

conda

conda config --add channels https://[org-id].cloudrepo.io/repository/conda

Authentication Methods

Basic Authentication

Include credentials in the URL:

https://username:password@[org-id].cloudrepo.io/repository/pypi/simple

Configuration File

Use .pypirc for publishing:

[cloudrepo]
repository = https://[org-id].cloudrepo.io/repository/pypi
username = your-username
password = your-password

Environment Variables

Set credentials via environment:

export CLOUDREPO_USERNAME=your-username
export CLOUDREPO_PASSWORD=your-password

Best Practices

Package Naming

  • Follow PEP 8 naming conventions

  • Use lowercase with hyphens for distribution names

  • Be consistent with PyPI naming when possible

Version Management

  • Use semantic versioning (major.minor.patch)

  • Tag pre-releases appropriately (1.0.0a1, 1.0.0b1, 1.0.0rc1)

  • Consider CalVer for date-based releases

Security

  • Always use HTTPS connections

  • Store credentials securely (use keyring when possible)

  • Use API keys for CI/CD systems

  • Regularly rotate credentials

Performance

  • Upload wheels in addition to source distributions

  • Use CloudRepo as a caching proxy for PyPI

  • Configure appropriate cache timeouts

Common Use Cases

Private Package Hosting

Host proprietary Python packages securely:

  1. Create a private repository

  2. Configure authentication

  3. Upload packages with twine

  4. Install with pip using credentials

Development Workflows

Manage development versions:

  1. Create a separate “dev” repository

  2. Upload development builds automatically

  3. Test packages before promoting to “releases”

CI/CD Integration

Automate package publishing:

  1. Generate API key for CI system

  2. Configure secure environment variables

  3. Add publishing step to pipeline

  4. Verify package availability

Dependency Proxying

Cache PyPI packages:

  1. Create a proxy repository pointing to PyPI

  2. Configure pip to use proxy repository

  3. Benefit from local caching and availability

Migration from PyPI

Moving from public PyPI to CloudRepo:

  1. Export package list: pip list –format freeze

  2. Download packages: pip download -r requirements.txt

  3. Upload to CloudRepo: twine upload –repository cloudrepo *.whl *.tar.gz

  4. Update pip configuration to use CloudRepo

Troubleshooting

Common Issues

  • SSL Certificate Errors: Ensure system certificates are up to date

  • 404 Not Found: Check repository URL includes /simple for pip

  • Authentication Failed: Verify credentials and repository permissions

  • Slow Downloads: Consider using a CloudRepo proxy for caching

Getting Help

Next Steps

Select your Python tool for detailed setup: