Creating a Client

from lobstr import Lobstr

async with Lobstr() as client:
    ...

Fetch a Story

story = await client.story.get("109l2t")

print(story.title)
print(story.score)

Fetch a User

user = await client.user.get("pushcx")

print(user.username)
print(user.karma)

Fetch a Comment

comment = await client.comment.get("szmc6l")

print(comment.username)
print(comment.content.plain)

Get Hot Stories

feed = await client.feed.hot()

for post in feed.posts:
    print(post.title)

Get New Stories

feed = await client.feed.new()

Get Stories by Tag

feed = await client.feed.tag("python")

for post in feed.posts:
    print(post.title)

List Available Tags

tags = await client.tag.list()

for tag in tags:
    print(tag.name)