cirun-py
🚀 Overview
cirun-py is a Python client and command-line interface for the Cirun platform, enabling seamless management of your CI/CD infrastructure. Whether you're managing repositories, or connecting cloud providers, cirun-py makes it simple with both a programmatic API and intuitive CLI.
✨ Features
- Dual Interface: Use as both a Python client library and CLI tool
- Repository Management: Easily activate, deactivate, and list repositories
- Cloud Provider Integration: Connect AWS, Azure, GCP, and other cloud providers
- Elegant API: Clean, Pythonic interface for all Cirun operations
- Rich Output Formatting: Beautiful CLI output for better readability
📦 Installation
Using pip (Recommended)
pip install cirun
Using conda
conda install -c conda-forge cirun
From Source
git clone https://github.com/cirun-io/cirun-py
cd cirun-py
pip install -e .
🏃♂️ Quick Start
- Get your API key from the Cirun dashboard
- Set your API key as an environment variable:
export CIRUN_API_KEY=<your-api-key>
- Start using cirun-py!
🧰 Usage
CLI Examples
Repository Management
# List active repositories
cirun repo list
# Activate a repository
cirun repo add username/repo-name
# Deactivate a repository
cirun repo remove username/repo-name
Cloud Provider Integration
# Connect AWS
cirun cloud connect aws --access-key AKIXXXXXXXXX --secret-key KFCF3yi+df0n12345678AMASDFGHJ
# Connect Azure
cirun cloud connect azure \
--subscription-id 31184337-0346-4782-ae59-eb185fd0cfa1 \
--tenant-id a66e466d-698b-4a91-b9e3-949f9cc04f11 \
--client-id 340d01fc-ba24-43ee-844e-d364899d29e7 \
--client-secret KFCF3yi+df0cirunIsAwesomeIsntIt?n1DFGHJ
# Or create Azure credentials automatically and connect in one step
# (requires Azure CLI to be installed and logged in)
cirun cloud create azure --auto-connect
# Connect GCP
cirun cloud connect gcp --key-file /path/to/service-account-key.json
Python Client Examples
from cirun import Cirun
# Initialize client (pass token or set CIRUN_API_KEY environment variable)
cirun_client = Cirun(token='cirun-4cabcdbf-275c-4500-890d-712340663ddc')
# List all repositories
repos = cirun_client.get_repos()
print(repos)
# Activate a repository
cirun_client.set_repo('username/repo-name', active=True)
# Deactivate a repository
cirun_client.set_repo('username/repo-name', active=False)
⚙️ Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
CIRUN_API_KEY |
API key for authentication | (Required) |
CIRUN_API_ENDPOINT |
Base URL for Cirun API | https://api.cirun.io/api/v1 |
📚 Documentation
For comprehensive documentation, visit:
🔍 Troubleshooting
Common Issues
- Authentication Errors: Ensure your API key is correctly set
- Connection Issues: Check your network connection to api.cirun.io
- Permission Problems: Verify you have the required permissions for the operation
💬 Support
Get help from our team and community:
- Slack: Join our community
- Email: support@cirun.io
- GitHub Issues: Report bugs
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
We welcome contributions! Here's how:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
🔄 Related Projects
- cirun-agent: Rust agent for on-premise runner provisioning
- cirun-docs: Documentation for the Cirun platform
Metadata
Release files for cirun 0.31
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cirun-0.31.tar.gz | 203.8 kB | Without provenance | Details for cirun-0.31.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cirun-0.31-py3-none-any.whl | Python 3 | none | any | Details for cirun-0.31-py3-none-any.whl |
Total release size: 219.0 kB
Release files / cirun-0.31.tar.gz
| Download URL | cirun-0.31.tar.gz |
|---|---|
| Size | 203.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe6199a1a889697fe6864b4d904e851273717367b9872cfa3d865dec8a2768d4
|
|
BLAKE2b-256 checksum How to use checksums |
7a1e02a26e447588f678a7effd2e29c17331ae8874504f234c28522a65bc9191
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / cirun-0.31-py3-none-any.whl
| Download URL | cirun-0.31-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dfd56fc7117058970017e29e2552aeb0578ae3a54f09a5d6fcdac96d9592f2f
|
|
BLAKE2b-256 checksum How to use checksums |
57671f6f3e54aba3b912c710ea62542265e0a20aabaab086f032b268527cb66f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for cirun 0.31
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.