Metadata-Version: 2.4
Name: magic-flow
Version: 0.1.11
Summary: Python SDK for the Flow blockchain with updated dependencies and Python 3.13 support
License: MIT
License-File: LICENSE
Author: Janez Podhostnik
Author-email: janez.podhostnik@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: backrefs (>=6.0.1,<7.0.0)
Requires-Dist: betterproto2 (>=0.9.0,<0.10.0)
Requires-Dist: ecdsa (>=v0.19,<0.20)
Requires-Dist: grpcio (>=1.75,<2.0)
Requires-Dist: grpcio-tools (>=1.65,<2.0)
Requires-Dist: pydantic-core (>=2.18.0)
Requires-Dist: rlp (>=4.0,<5.0)
Project-URL: Repository, https://github.com/magiclabs/magic-flow-python
Description-Content-Type: text/markdown

# Magic Flow Python SDK

A comprehensive Python SDK for building applications that interact with the Flow blockchain network. This SDK provides a complete set of tools for developers to query, transact, and build on Flow.

[![PyPI](https://img.shields.io/pypi/v/magic-flow.svg)](https://pypi.org/project/magic-flow/)
[![codecov](https://codecov.io/gh/magiclabs/magic-flow-python/branch/master/graph/badge.svg)](https://codecov.io/gh/magiclabs/magic-flow-python)
[![Python](https://img.shields.io/pypi/pyversions/magic-flow.svg)](https://pypi.org/project/magic-flow/)
[![License](https://img.shields.io/pypi/l/magic-flow.svg)](https://pypi.org/project/magic-flow/)

## Features

- 🔗 **Complete Flow Integration** - Full support for Flow blockchain operations
- 🚀 **Async/Await Support** - Modern Python async programming patterns
- 🔐 **Advanced Signing** - Support for complex transaction signing scenarios
- 📊 **Query Capabilities** - Query blocks, accounts, events, and transactions
- 🛠️ **Script Execution** - Execute Cadence scripts on the Flow network
- 🏗️ **Account Management** - Create and manage Flow accounts
- 📝 **Contract Deployment** - Deploy, update, and manage smart contracts
- 🧪 **Emulator Compatible** - Works with Flow Emulator for local development

## Quick Start

### Installation

Requires Python 3.10 or higher.

```bash
pip install magic-flow
```

Or with Poetry:

```bash
poetry add magic-flow
```

### Basic Usage

```python
import asyncio
from magic_flow.client import flow_client

async def main():
    async with flow_client(host="127.0.0.1", port=3569) as client:
        # Get the latest block
        block = await client.get_latest_block()
        print(f"Latest block height: {block.height}")

        # Get account information
        account = await client.get_account(address="0x01")
        print(f"Account balance: {account.balance}")

if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation

- 📖 **[Complete Guide](https://magiclabs.github.io/magic-flow-python/python_SDK_guide/)** - Comprehensive documentation
- 🔧 **[API Reference](https://magiclabs.github.io/magic-flow-python/api_docs/)** - Detailed API documentation
- 💡 **[Examples](https://magiclabs.github.io/magic-flow-python/examples/)** - Code examples and tutorials

## Development

This SDK is fully compatible with the Flow Emulator and can be used for local development.

### Requirements

- Python 3.10+
- Flow Emulator (for local development)

### Contributing

We welcome contributions! Please see our [Contributing Guide](docs/contributing.md) for details.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributors

<a href="https://github.com/magiclabs/magic-flow-python/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=magiclabs/magic-flow-python" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

