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.
- 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
pip install cirun
conda install -c conda-forge cirun
git clone https://github.com/cirun-io/cirun-py
cd cirun-py
pip install -e .
- 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!
# List active repositories
cirun repo list
# Activate a repository
cirun repo add username/repo-name
# Deactivate a repository
cirun repo remove username/repo-name
# 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
# Connect GCP
cirun cloud connect gcp --key-file /path/to/service-account-key.json
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)
Variable | Description | Default |
---|---|---|
CIRUN_API_KEY |
API key for authentication | (Required) |
CIRUN_API_URL |
Base URL for Cirun API | https://api.cirun.io/api/v1 |
For comprehensive documentation, visit:
- 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
Get help from our team and community:
- Slack: Join our community
- Email: [email protected]
- GitHub Issues: Report bugs
This project is licensed under the MIT License - see the LICENSE file for details.
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
- cirun-agent: Rust agent for on-premise runner provisioning
- cirun-docs: Documentation for the Cirun platform