https://github.com/charlesneimog/anytype-client
Python Client for Anytype.
https://github.com/charlesneimog/anytype-client
anytype api python
Last synced: 5 months ago
JSON representation
Python Client for Anytype.
- Host: GitHub
- URL: https://github.com/charlesneimog/anytype-client
- Owner: charlesneimog
- License: gpl-3.0
- Created: 2025-01-30T16:53:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-29T13:13:01.000Z (about 1 year ago)
- Last Synced: 2025-09-05T17:40:41.085Z (9 months ago)
- Topics: anytype, api, python
- Language: Python
- Homepage: https://charlesneimog.github.io/anytype-client/
- Size: 1.35 MB
- Stars: 76
- Watchers: 6
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# Anytype Python Client
[](https://www.python.org/)
[](https://github.com/charlesneimog/anytype-client/blob/main/LICENSE)
A Python client for interacting with [Anytype](https://anytype.io/). 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](https://github.com/charlesneimog/anytype-client/tree/main/examples)).
---
## 📦 Installation
```bash
pip install anytype-client
```
### Prerequisites:
- Python 3.10+
- Anytype desktop app (v0.44.13-beta or higher) running during authentication
## ⚡ Quick Start
1. Authentication
``` python
from anytype import Anytype
# Initialize client (first run triggers authentication)
any = Anytype()
any.auth() # 🔑 Enter 4-digit code from Anytype app when prompted
```
2. Create Your First Object
``` python
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:")
# Commit to workspace
created_object = my_space.create_object(new_note, note_type)
print(f"Created object: {created_object.id}")
```
## 🌟 Examples
| Example | Description | Results |
|---------|-------------| ------ |
| [📄 Hello World](examples/hello_world.py) | Create a basic note with formatted text | [Check Result](resources/hello.png) |
| [📚 PDF Notes Importer](examples/import-pdf-notes.py) | Batch import annotated PDFs | [Check Result](resources/pdf.png) |
| *More examples coming as Anytype API evolves* | [Request a feature](https://github.com/charlesneimog/anytype-client/issues) | ⚔️ |
## 📄 Documentation
Check the documentation [here](https://charlesneimog.github.io/anytype-client)!
## 🤝 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.