Skip to main content

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 codecov Python License

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.

pip install magic-flow

Or with Poetry:

poetry add magic-flow

Basic Usage

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

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 for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributors

Made with contrib.rocks.

Metadata

Release files for magic-flow 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magic-flow 0.1.11
File Size Uploaded
magic_flow-0.1.11.tar.gz 36.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for magic-flow 0.1.11
File Interpreter ABI Platform
magic_flow-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 87.4 kB

Release files / magic_flow-0.1.11.tar.gz

Download URL magic_flow-0.1.11.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6dec075952cb532ef771e58358e52ce91a0c8338a0aa3d6940c3766791aae996
BLAKE2b-256 checksum
How to use checksums
019bebbcc9d8357aa8d5e7e79da70f74f7fe64b04aaedc46c95e4fe6256b47fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0

Release files / magic_flow-0.1.11-py3-none-any.whl

Download URL magic_flow-0.1.11-py3-none-any.whl
Size 51.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05d9722c31592743fcee8c1c3b4d64b5f07f00d492e698d6589a86320745b055
BLAKE2b-256 checksum
How to use checksums
8960e64828c1d5a82558e832f2fbf399a83ea65ccbbcba30e00693dc23072947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page