I’ve implemented and published a Python client library for the Anytype API. I used Claude code, but I kept a close eye on it and I’m confident that the code is high quality. (I should note that I’m an experienced software developer and I provided a lot of guidance and feedback – this wasn’t vibe coding ) It’s very much alpha, and only some of the endpoints are fully working and tested but it should be a good start. Interested in feedback, contributions, etc.
Anytype Python Client v0.1.0-alpha
Initial Alpha Release
A comprehensive Python client library for the Anytype API, providing both synchronous and asynchronous interfaces for interacting with Anytype’s knowledge management platform.
What’s Included
Fully Implemented & Tested
Authentication: Challenge-based API key creation and management
Spaces: Workspace creation, listing, and management
Objects: Full CRUD operations for all object types (pages, notes, etc.)
Search: Powerful search with filters and pagination
Types: Custom object type definitions
Properties: Custom property creation with various formats
Absolutely fantastic job! I’m really impressed with your work. I’m definitely going to experiment with this myself, maybe I can even find a way to connect it with Ollama, lmao. This is perfect for automations!
Did you come across any rate limiting information or issues during your development of this library?
For context, I’m trying to import loads of quotes into AnyType and routinely hitting rate-limits. I noticed a few headers that show the rate limit statuses but I’ve not been able to find any related info in the API docs yet.
P.S. I wish I saw this library before I cobbled together a mish-mash script that imports a bunch of Kindle clipping book quotes. If I make the import a bit more “productionised” I’ll use this library, it looks great from a quick scan!
EDIT:
I found a mention in the changelog about rate limits and how to disable it
Changed
Burst rate limiting (sustained 1rps, burst size 60) with option to disable via ANYTYPE_API_DISABLE_RATE_LIMIT=1 environment variable
That would be great. I have been playing with the local API server and it is great, but it responds very slowly, I suspect because of the rate limit feature.
I set a global environment variable in my system (Windows 10) as ANYTYPE_API_DISABLE_RATE_LIMIT with value 1. However, the API response is still quite slow.
@davidpaez hey, the rate limit should only cause this behavior if you’re encountering a 429 error response code - “too many requests.”
could you describe the types of requests you’re running that seem slow? depending on the scope of the database lookups, this might be slower in the current version compared to the upcoming api update, which will include significant performance improvements.
i’d be happy to dig deeper if you share some details!
Great lib! thanks. But I’m missing the list objects call if I gather the motivation, will do a PR, I think is just the client.py:382 without the /{object_id} at the end or url.