Metadata-Version: 2.4
Name: joescorner
Version: 1.0.0
Summary: The official Python SDK for the Joe's Corner API
Keywords: joescorner,news,content-aggregator,api-client,sdk
Author: joescorner
Author-email: joescorner <271818492+joescorner@users.noreply.github.com>
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Typing :: Typed
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: httpx>=0.28,<1.0
Requires-Dist: pydantic>=2.12,<3.0
Requires-Python: >=3.11
Project-URL: Homepage, https://joescorner.ai
Project-URL: Repository, https://github.com/joescorner/joescorner-python
Project-URL: Issues, https://github.com/joescorner/joescorner/issues
Project-URL: Changelog, https://github.com/joescorner/joescorner-python/releases
Description-Content-Type: text/markdown

<h1 align="center">
    Joe's Corner Python SDK
</h1>
<p align="center">
    <p align="center">The official Python client for the Joe's Corner API. Joe's Corner is a content aggregator for the AI age. Discover, follow, curated, un-biased news feeds on any topic. Powered by AI with full transparency.</p>
</p>
<p align="center">
    <a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv"></a>
    <a href="https://github.com/astral-sh/ty"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json" alt="ty"></a>
    <a href="https://pypi.org/project/joescorner/"><img src="https://img.shields.io/pypi/v/joescorner" alt="PyPI"></a>
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
</p>


## Installation

```bash
uv add joescorner

# Or with pip:
pip install joescorner
```

## Getting Started

```python
from joescorner import FeedSort, JoesCorner

client = JoesCorner()

# List feeds sorted by popularity
feeds = client.list_feeds(sort=FeedSort.POPULAR, limit=5)
for feed in feeds.items:
    print(f"{feed.owner}/{feed.slug}: {feed.name}")

# Get metadata for the first feed
first = feeds.items[0]
result = client.get_feed(first.owner, first.slug)
feed = result.feed

# List posts in that feed
posts = client.list_posts(feed.owner, feed.slug, limit=10)
for post in posts.items:
    print(f"{post.title} - {post.url}")

# Get a single post
post = posts.items[0]
result = client.get_post(feed.owner, feed.slug, post.id)

# Paginate through results
feeds = client.list_feeds(limit=20)
while feeds.next_cursor:
    feeds = client.list_feeds(limit=20, cursor=feeds.next_cursor)
```

See the [OpenAPI spec](https://github.com/joescorner/joescorner-openapi) for the full API reference.

An async client is also available:

```python
from joescorner import AsyncJoesCorner

async with AsyncJoesCorner() as client:
    feeds = await client.list_feeds()
```


## License

MIT
