AD
Boost Your Brand on BlueSky—Exclusive banner space to amplify your reach within the BlueSky community.
BSkyInfo LogoBskyInfo
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryArticlesGuidesGlossaryBluesky SDKsSponsor
Submit
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryGuidesGlossaryArticlesBluesky SDKsSponsorSubmit
  1. SDKs
  2. /Python
  3. /chitose
mnogu

chitose

A Python SDK for Bluesky and AT Protocol by mnogu

Python client library for the AT Protocol (Bluesky)

GitHub Stats

17stars
4forks
1contributors
4open issues

Dates

Created:April 27, 2023
Last updated:November 13, 2024

README

The following content is from chitose's GitHub repository. All rights reserved by the original author.

Chitose

Python PyPI Read the Docs

Chitose is a Python client library for the AT Protocol (Bluesky).

Usage

The API of Chitose is similar to the ATP API.

For example, you can use get_timeline() in BskyAgent to get the timeline as shown below. Replace YOUR_USERNAME and YOUR_PASSWORD with your username and your password respectively:

$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3
>>> from chitose import BskyAgent
>>> agent = BskyAgent(service='https://bsky.social')
>>> agent.login(identifier='YOUR_USERNAME', password='YOUR_PASSWORD')
>>> agent.get_timeline(limit=1)

For available methods in BskyAgent, refer to the documentation of BskyAgent.

Alternatively, you can use app.bsky.feed.get_timeline() as in the advanced API calls:

$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3
>>> from chitose import BskyAgent
>>> agent = BskyAgent(service='https://bsky.social')
>>> agent.login(identifier='YOUR_USERNAME', password='YOUR_PASSWORD')
>>> agent.app.bsky.feed.get_timeline(limit=1)

You can also post with com.atproto.repo.create_record():

from datetime import datetime
from datetime import timezone
from chitose import BskyAgent
from chitose.app.bsky.feed.post import Post

agent = BskyAgent(service='https://example.com')
agent.login(identifier='alice@mail.com', password='hunter2')

record = Post(text='Hello, world!',
              created_at=datetime.now(timezone.utc).isoformat())
agent.com.atproto.repo.create_record(
    repo=alice.did, collection='app.bsky.feed.post', record=record)

See also the examples directory for sample code.

Documentation

For all the functions and classes available in Chitose, refer to the Chitose’s documentation.

Install

While you can use Chitose without installing its Python package, you can install the package:

$ python3 -m pip install chitose

Alternatively, you can build a Python package and install it:

$ git clone https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 -m pip install -r requirements.txt
$ python3 -m pip install --upgrade build
$ python3 -m build
$ python3 -m pip install dist/chitose-*-py3-none-any.whl

Generating Code

Most source files of Chitose are generated from the Lexicon files in the atproto directory, and you can generate Python code from these files by yourself:

$ git clone --recursive https://github.com/mnogu/chitose.git
$ cd chitose
$ python3 generate.py

You can also update the atproto directory and regenerate Python code:

$ git submodule update --remote atproto
$ python3 generate.py

You may want to add new Python code to the repository or update the documentation:

$ git add chitose
$ git commit
$ python3 -m pip install -r docs/source/requirements.txt
$ cd docs
$ sphinx-apidoc -o ./source ../chitose -f

Topics

atprotoatprotocolblueskybluesky-clientbskypythonpython3

Related SDKs

dannguyendancow-bluesky-fun-api-tool

Just having fun with python and Bluesky's AT Protocol. Trying to build a simple CLI and enough of SDK to easily explore and collect my own Bluesky data

1•Python
TahomaSoftSaxeBlueskyPython

A small python library to post basic text and media to bsky.app via atproto's xrpc API.

1•Python
Gorcenskiskeeter-deleter

A script for auto-deleting Bluesky posts

65•Python
Zetaphorbsky-altometer

A site that measures the current percentage of Bluesky posts missing alt text

7•Python
snarfedbridgy-fed

🌉 A bridge between decentralized social networks

1002•Python
snarfedgranary

💬 The social web translator

485•Python

Resources

GitHub Repository

License

MIT

Author

mnogu
mnogu

Activity

Last commit: November 13, 2024
Commit frequency: Unknown

Our Sponsors

Your Brand Here!

50K+ engaged viewers every month

Limited spots available!

📧 Contact us via email🦋 Contact us on Bluesky
BSkyInfo LogoBskyInfo

The Most Comprehensive Bluesky Tools Directory

Stay updated with the latest Bluesky tools and ecosystem news 🦋

Bluesky butterfly logo
Quick LinksSubmit a ToolSponsorAboutLegal Information
ToolsFeed DirectoryLabeler DirectorySchedulingAnalyticsAll ToolsCategoriesCollectionsTags
ResourcesArticlesBluesky GuidesBluesky GlossaryBluesky SDKsBluesky ResourcesSkyRaffleMeida Coverage
Our ProductsRaffleBlueAiTeach ToolsLaiewAI affiliate listFirsto

This website may contain affiliate links

© 2025 BskyInfo. All rights reserved.