Skip to main content

Python SDK for the Flow blockchain with updated dependencies and Python 3.13 support

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magic_flow-0.1.11.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magic_flow-0.1.11-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

Details for the file magic_flow-0.1.11.tar.gz.

File metadata

  • Download URL: magic_flow-0.1.11.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0

File hashes

Hashes for magic_flow-0.1.11.tar.gz
Algorithm Hash digest
SHA256 6dec075952cb532ef771e58358e52ce91a0c8338a0aa3d6940c3766791aae996
MD5 1c3a751698f53ab129b16ab109d93733
BLAKE2b-256 019bebbcc9d8357aa8d5e7e79da70f74f7fe64b04aaedc46c95e4fe6256b47fe

See more details on using hashes here.

File details

Details for the file magic_flow-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: magic_flow-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 51.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0

File hashes

Hashes for magic_flow-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 05d9722c31592743fcee8c1c3b4d64b5f07f00d492e698d6589a86320745b055
MD5 e9b51774204aeef49a62a786f3095586
BLAKE2b-256 8960e64828c1d5a82558e832f2fbf399a83ea65ccbbcba30e00693dc23072947

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page