Skip to main content

Anytype Python Client

Python Version License

A Python client for interacting with Anytype. Automate workflows and integrate with your apps! ✨


🚀 Features

  • Seamless Integration: Connect Python scripts directly to your Anytype workspace.
  • Object Management: Create, modify, and organize pages, notes, and custom objects.
  • Space Operations: Manage spaces, types, and relations programmatically.
  • Batch Operations: Export data, automate repetitive tasks, and more.
  • PDF Import Example: Bulk import annotated PDFs as structured notes (see examples).

📦 Installation

pip install anytype-client

Prerequisites:

  • Python 3.10+
  • Anytype desktop app (v0.44.13-beta or higher) running during authentication

⚡ Quick Start

  1. Authentication
from anytype import Anytype

# Initialize client (first run triggers authentication)
any = Anytype()
any.auth()  # 🔑 Enter 4-digit code from Anytype app when prompted
  1. Create Your First Object
from anytype import Object

# Get your workspace
spaces = any.get_spaces()
my_space = spaces[0]  # Use your preferred space

# Create a new page
note_type = my_space.get_type("Page")
new_note = Object()
new_note.name = "My Python-Powered Note 📝"
new_note.icon = "🔥"
new_note.description = "Automatically generated via Python API"

# Add rich content
new_note.add_title1("Welcome to Automated Knowledge Management!")
new_note.add_text("This section was created programmatically using Python")

# Commit to workspace
created_object = my_space.create_object(new_note, note_type)
print(f"Created object: {created_object.name}")

API 2025-11-08

List endpoints accept the API's dynamic filter syntax as a dictionary, global search accepts the complete search body, and spaces expose chat listing and file upload:

spaces = any.get_spaces(filters={"name[contains]": "project"})
pages = any.global_search(
    "roadmap",
    types=["page", "task"],
    sort={"direction": "desc", "property_key": "last_modified_date"},
)

chats = spaces[0].get_chats(limit=50)
uploaded = spaces[0].upload_file("./report.pdf")
objects = spaces[0].get_objects(
    filters={"type": "page", "created_date[gte]": "2024-01-01"}
)

🌟 Examples

Example Description Results
📄 Hello World Create a basic note with formatted text Check Result
🏷️ Custom properties Create from a type and template with date and object properties
🔌 API 2025-11-08 Explore listing, search, tags, templates, upload, and list objects
📚 PDF Notes Importer Batch import annotated PDFs Check Result
More examples coming as Anytype API evolves Request a feature ⚔️

📄 Documentation

Check the documentation here!

🤝 Contributing

Contributions are welcomed! Here's how to help:

  1. Report bugs or request features via Issues
  2. Submit pull requests for improvements
  3. Share your use cases in Discussions

📄 License

GPL-3.0 License - see LICENSE for details.

Download files

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

Source Distribution

anytype_client-0.5.0.tar.gz (41.1 kB view details)

Uploaded Source

File details

Details for the file anytype_client-0.5.0.tar.gz.

File metadata

  • Download URL: anytype_client-0.5.0.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for anytype_client-0.5.0.tar.gz
Algorithm Hash digest
SHA256 bd6ec71431bfd9c2827d370bb5b97780d4e97bf16b64c9e582771a0f28630eb3
MD5 d4c5c8a84e781134188aef7d0d8e0324
BLAKE2b-256 f4efc7ec18bfa2b0fb9a2dfadeacf1d6dcb8d4c6fbfec9e7ae4eed6226ed6314

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 file

0.4.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.1

1 file

0.1.0

1 file

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