Skip to main content

Feedo Network Python SDK

The official Developer SDK for interacting with the Feedo Network.

Feedo is a decentralized network consisting of Search, Consensus, and Storage nodes. This SDK provides a unified, asynchronous interface to interact with all layers of the Feedo Network.

Features

  • Dynamic Node Routing: The SDK automatically pings seed nodes and routes your requests to the fastest available node. If a node goes offline, the router instantly falls back to another healthy node.
  • Fully Asynchronous: Built on top of httpx and asyncio for maximum performance in AI agents and backend applications.
  • Search Module: Execute semantic vector queries, index new documents, and manage deployed websites.
  • Consensus Module: Register Decentralized Identifiers (DIDs), resolve .feedo names, and manage network grants.
  • Storage Module: Upload, download, and subscribe to data streams on the decentralized storage layer.

Installation

pip install feedo-sdk

Initialization

The SDK requires an event loop since it is entirely async. You do not need to specify URLs for the nodes; the SDK auto-discovers the fastest connection.

import asyncio
from feedo import FeedoClient

async def main():
    client = FeedoClient()
    # Your code here

asyncio.run(main())

(Optional) Custom seed nodes for private clusters:

client = FeedoClient(
    search_seeds=["https://my-search.node"],
    consensus_seeds=["https://my-consensus.node"],
    storage_seeds=["https://my-storage.node"]
)

Search Module (client.search)

The Search module handles semantic queries and document vectorization.

query(query_text: str, limit: int = 10)

Perform a semantic search across the network.

results = await client.search.query("DeFi protocols", limit=5)
print(results)

index_document(content: str, metadata: dict = None)

Index a raw document into the vector database.

await client.search.index_document("Bitcoin is decentralized.", {"source": "wiki"})

deploy_proxy(directory_path: str, domain: str)

Publish a local directory to the network under a specific domain.

await client.search.deploy_proxy("/path/to/build", "my-app.feedo")

unpin(cid: str)

Remove a pinned deployment from the proxy.

await client.search.unpin("Qm...")

get_stats()

Retrieve network statistics.

stats = await client.search.get_stats()

Consensus Module (client.consensus)

The Consensus module manages identity (DIDs), naming (.feedo domains), and grants.

resolve_name(name: str)

Resolve a .feedo domain to its underlying CID (IPFS hash).

info = await client.consensus.resolve_name("my-app.feedo")
print(info['cid'])

register_did(pubkey_hex: str, signature_hex: str)

Register a new Decentralized Identifier.

await client.consensus.register_did("0xabc...", "0xdef...")

get_did_balance(did: str)

Check the token balance of a specific DID.

balance = await client.consensus.get_did_balance("did:feedo:0xabc...")

register_name(name: str, did: str, cid: str, signature_hex: str)

Register a new .feedo domain.

await client.consensus.register_name("my-app", "did:feedo:...", "Qm...", "0x...")

update_name_cid(name: str, new_cid: str, signature_hex: str)

Update the CID of an existing name.

await client.consensus.update_name_cid("my-app", "QmNew...", "0x...")

Storage Module (client.storage)

The Storage module acts as a decentralized file system.

upload_file(file_path: str, filename: str = "file")

Upload a local file to the network.

response = await client.storage.upload_file("./image.png")
print("Hash:", response['hash'])

download_file(hash_id: str) -> bytes

Download a file from the network by its hash.

raw_data = await client.storage.download_file("Qm...")
with open("downloaded.png", "wb") as f:
    f.write(raw_data)

ingest_json(payload: dict)

Ingest structured JSON data directly into storage.

await client.storage.ingest_json({"user": "alice", "action": "post"})

get_recent_files()

Get a list of recently uploaded files.

recent = await client.storage.get_recent_files()

Error Handling

The SDK handles node failover automatically via the NodeRouter. However, if all seed nodes are unreachable, or if a specific network validation error occurs, the SDK will raise an exception. It is highly recommended to wrap network calls in try/except blocks:

try:
    results = await client.search.query("DeFi protocols")
except Exception as e:
    print(f"Feedo Network Error: {e}")

Response Structures

All responses are returned as native Python dictionaries matching the JSON schema of the Feedo Network. For example, a search result typically contains:

  • id: Unique document identifier
  • score: Semantic similarity score
  • metadata: Associated metadata dictionary
  • content: The raw text content

Contributing

We welcome contributions to the Feedo Network SDK!

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'Add some amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request.

License

Apache License 2.0

Download files

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

Source Distribution

feedo_sdk-0.1.4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

feedo_sdk-0.1.4-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file feedo_sdk-0.1.4.tar.gz.

File metadata

  • Download URL: feedo_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for feedo_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 57ab5672baa183d9e6ce377229aa989fe29d2531f6247b6a7f3c2deade54bc7d
MD5 8d3bedd17c05883c5f6df82ff6d76be5
BLAKE2b-256 4ffcff99c453d9b85e9972eaa5a9fad1e9b5ff8965559b271e2d7b3bc2521fa6

See more details on using hashes here.

File details

Details for the file feedo_sdk-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: feedo_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for feedo_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 58eaba287119a069028ffccc28261959f7344f31028453b49954ab074880ee3e
MD5 c91b81ba96902c4f25006fed6c8931ae
BLAKE2b-256 095db466ff0aac3cb87260b03d25e90c3c4be64232e506f0361cd4661236266c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.25

2 files

0.1.24

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

1 file

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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