MGC SDK for Python
An unofficial, open-source Python SDK for interacting with the Magalu Cloud API.
This project aims to provide a Pythonic and developer-friendly interface for Magalu Cloud services, inspired by the official Go SDK while remaining completely independent from Magalu Cloud and its maintainers. The project is community-driven and maintained by contributors.
Disclaimer
This is an unofficial SDK and is not affiliated with, endorsed by, or maintained by Magalu Cloud. For the official SDKs and tools, visit the Magalu Cloud GitHub organization.
Features
- Pythonic API design
- Async support using
httpx - Typed Python interfaces
- Modular service architecture
- Easy authentication using API keys
- Open-source and community-driven
- Designed for automation, scripting, and backend applications
Installation
Using pip
pip install mgc-sdk-python
Using uv
uv add mgc-sdk-python
Development installation
git clone https://github.com/kayqueGovetri/mgc-sdk-python.git
cd mgc-sdk-python
make sync-dev
Quick Start
import asyncio
from mgc.client import Client
async def main() -> None:
async with Client(api_key="YOUR_API_KEY") as client:
virtual_machines = await client.compute.virtual_machines.list()
print(virtual_machines)
if __name__ == "__main__":
asyncio.run(main())
Authentication
The SDK authenticates requests with a Magalu Cloud API key. Pass the key when creating the client:
from mgc.client import Client
client = Client(
api_key="YOUR_API_KEY"
)
Supported Services
Current implementation status:
Compute
- Virtual Machines
- Images
- Machine Types
- Snapshots
- Backups
Block Storage
- Volumes
- Snapshots
- Volume type lookup
Networking
- VPCs
- Subnets
- Security Groups
- Public IPs
Kubernetes
- Clusters
- Node Pools
Database
- DBaaS Instances
- Replicas
- Snapshots
The roadmap evolves based on community contributions and API availability.
Project Structure
mgc-sdk-python/
├── examples/
│ ├── block_storage/
│ │ ├── snapshot/
│ │ └── volume/
│ └── compute/
│ ├── backup/
│ ├── images/
│ ├── snapshot/
│ └── virtual_machine/
├── src/
│ └── mgc/
│ ├── resources/
│ │ ├── block_storage/
│ │ │ ├── block_storage.py
│ │ │ ├── snapshots.py
│ │ │ └── volumes.py
│ │ └── compute/
│ │ ├── backups.py
│ │ ├── compute.py
│ │ ├── images.py
│ │ ├── machine_types.py
│ │ ├── snapshots.py
│ │ └── virtual_machines.py
│ ├── __init__.py
│ ├── auth.py
│ ├── client.py
│ ├── config.py
│ ├── exceptions.py
│ ├── region.py
│ └── transport.py
├── tests/
│ ├── resources/
│ │ ├── block_storage/
│ │ └── compute/
│ ├── conftest.py
│ ├── test_client.py
│ ├── test_config.py
│ ├── test_region.py
│ └── test_transport.py
├── LICENSE
├── Makefile
├── pyproject.toml
├── README.md
Why This Project?
While Magalu Cloud provides official tooling and SDKs, Python developers may prefer a native Python experience for:
- Automation
- Infrastructure management
- Data engineering
- Backend services
- Serverless applications
- Scripts and CLI tools
This project seeks to fill that gap with a modern Python SDK.
Contributing
Contributions are welcome.
You can contribute by:
- Reporting bugs
- Suggesting new features
- Improving documentation
- Adding support for new services
- Writing tests
Running tests
make test
Linting
make lint
Formatting check
make ruff-format-check
Roadmap
- Full Compute API coverage
- Networking support
- Kubernetes support
- DBaaS support
- Object Storage support
- CLI integration
- Complete documentation
- Automated releases
Related Projects
- Official Magalu Cloud Go SDK
- Official Magalu Cloud Organization
See the LICENSE file for details.
Built and maintained by the open-source community.
Metadata
Release files for mgc-sdk-python 0.0.3
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 |
|---|---|---|---|---|
| mgc_sdk_python-0.0.3.tar.gz | 19.0 kB | With provenance | Details for mgc_sdk_python-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mgc_sdk_python-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for mgc_sdk_python-0.0.3-py3-none-any.whl |
Total release size: 40.6 kB
Release files / mgc_sdk_python-0.0.3.tar.gz
| Download URL | mgc_sdk_python-0.0.3.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5365958d63e611b9a0147e534d00a7d5b60827f7d1c6249cda74191739266aa7
|
|
BLAKE2b-256 checksum How to use checksums |
3f6687ee557c19b8fe7c02fd18faccc1c5343a392559df5434d50786076dd45c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logRelease files / mgc_sdk_python-0.0.3-py3-none-any.whl
| Download URL | mgc_sdk_python-0.0.3-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b90b485c074cba61e1f5e69619a2e4d3f6e742ffc1299aee266d2d5823c62434
|
|
BLAKE2b-256 checksum How to use checksums |
dfb1bfb3161dc8dcfb63db30cceb708ad40f20738df3eea62e775abb95507b16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logSecurity for mgc-sdk-python 0.0.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mgc_sdk_python-0.0.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logA 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.