Skip to main content

Feedo Protocol Python SDK

The official Developer SDK for interacting with the Feedo Protocol.

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 Protocol.

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 Protocol Error: {e}")

Response Structures

All responses are returned as native Python dictionaries matching the JSON schema of the Feedo Protocol. 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 Protocol SDK! GitHub Repository: https://github.com/Ashixi/feedo-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.7.tar.gz (8.3 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.7-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feedo_sdk-0.1.7.tar.gz
  • Upload date:
  • Size: 8.3 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.7.tar.gz
Algorithm Hash digest
SHA256 44955d3697ac66038f6222b9f48a21d9b07249152301c4c148284d438f242937
MD5 25e3e9ba9bc74b09098c08e9804887f0
BLAKE2b-256 cabf7ee9f8a550554dbbdb58ed28381aadd044efeb10b1135508b03dd94041e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feedo_sdk-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 29b1e214ca0cabcd9d531a6d667c4ea989a63e2a49cd54ce78c9801c72a538fd
MD5 907b232b8425877c104c4a3e8245739f
BLAKE2b-256 7051efabed8f2442675b37ace5f0abe850e12aa8cf2e991629d8aa1be9b720e4

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

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

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