polaris-news
Official Python SDK for The Polaris Report API.
Installation
pip install polaris-news
Quick Start
Authenticate via CLI
polaris login # opens GitHub in your browser — API key saved automatically
polaris whoami # check your auth status
polaris logout # remove saved credentials
Use the client
from polaris_news import PolarisClient
client = PolarisClient() # auto-reads saved credentials
feed = client.feed(category="technology", limit=10)
for brief in feed.briefs:
print(brief.headline)
You can also pass a key explicitly or set the POLARIS_API_KEY environment variable.
Methods
| Method | Description |
|---|---|
feed(category?, limit?, page?, per_page?, min_confidence?) |
Get the news feed |
brief(brief_id, include_full_text?) |
Get a single brief by ID |
search(query, category?, page?, per_page?, sort?, min_confidence?, from_date?, to_date?, entity?, sentiment?) |
Search briefs |
generate(topic, category?) |
Generate a brief on a topic |
entities(q?, type?, limit?) |
List entities |
entity_briefs(name, role?, limit?, offset?) |
Get briefs for an entity |
trending_entities(limit?) |
Get trending entities |
similar(brief_id, limit?) |
Get similar briefs |
clusters(period?, limit?) |
Get brief clusters |
data(entity?, type?, limit?) |
Get structured data points |
agent_feed(category?, tags?, limit?, min_confidence?) |
Get agent-optimized feed |
compare_sources(brief_id) |
Compare sources for a brief |
trending(period?, limit?) |
Get trending briefs |
verify(claim, context?) |
Fact-check a claim against briefs |
stream(categories?) |
Stream briefs via SSE (generator) |
Error Handling
from polaris_news import PolarisClient, AuthenticationError, RateLimitError, NotFoundError
client = PolarisClient()
try:
brief = client.brief("abc123")
except AuthenticationError:
print("Invalid API key")
except NotFoundError:
print("Brief not found")
except RateLimitError as e:
print(f"Rate limited. Retry after: {e.retry_after}s")
Streaming
client = PolarisClient()
for brief in client.stream(categories="technology,science"):
print(f"[{brief.category}] {brief.headline}")
Documentation
Full API documentation: https://thepolarisreport.com/docs
Metadata
Release files for polaris-news 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polaris_news-0.8.0.tar.gz | 15.6 kB | Without provenance | Details for polaris_news-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polaris_news-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for polaris_news-0.8.0-py3-none-any.whl |
Total release size: 34.0 kB
Release files / polaris_news-0.8.0.tar.gz
| Download URL | polaris_news-0.8.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b290071bbde23edd672ec0bcf9d6d6d86677612a7d664243ef70dd1053e1b4b1
|
|
BLAKE2b-256 checksum How to use checksums |
f7d5ae6ff679e638511818fd702ad162e1239aafa75401ce762b84b64fbcb7a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / polaris_news-0.8.0-py3-none-any.whl
| Download URL | polaris_news-0.8.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b738ada15151e2f1b5dcfe4f1c4bd30ba6baae014b4828e8cc96d8573146efe
|
|
BLAKE2b-256 checksum How to use checksums |
88a5dbfe279b21555724e94ddca1a2feb1e03f0138c75d05edf91e52f74af397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for polaris-news 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.