v0.0.40
What's Changed
Syntax sugar for records is here! Check out how simple work with basic operations is:
from atproto import AtUri, Client, models
client = Client()
client.login('my-username', 'my-password')
# get records list
posts = client.app.bsky.feed.post.list(client.me.did, limit=10)
for uri, post in posts.records.items():
print(uri, post.text)
# get specific record
post = client.app.bsky.feed.post.get(client.me.did, AtUri.from_str(uri).rkey)
print(post.value.text)
# create new record
post_record = models.AppBskyFeedPost.Record(text='test record namespaces', created_at=client.get_current_time_iso())
new_post = client.app.bsky.feed.post.create(client.me.did, post_record)
print(new_post)
# delete record
deleted_post = client.app.bsky.feed.post.delete(client.me.did, AtUri.from_str(new_post.uri).rkey)
print(deleted_post)
- Add record syntax sugar with get, list, create, and delete methods by @MarshalX in #263
- Rename record models from "Main" to "Record" by @MarshalX in #264
- Integrate syntax sugar for repo operations upon records by @MarshalX in #266
Full Changelog: v0.0.39...v0.0.40