adanos 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adanos-1.0.0/.github/workflows/ci.yml +41 -0
- adanos-1.0.0/.github/workflows/publish-pypi.yml +83 -0
- adanos-1.0.0/.gitignore +34 -0
- adanos-1.0.0/CHANGELOG.md +25 -0
- adanos-1.0.0/LICENSE +21 -0
- adanos-1.0.0/PKG-INFO +376 -0
- adanos-1.0.0/README.md +338 -0
- adanos-1.0.0/openapi-python-client.yaml +1 -0
- adanos-1.0.0/pyproject.toml +59 -0
- adanos-1.0.0/src/adanos/__init__.py +7 -0
- adanos-1.0.0/src/adanos/_generated/__init__.py +8 -0
- adanos-1.0.0/src/adanos/_generated/api/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/compare_news_stocks.py +248 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_stats.py +152 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_stock_explanation.py +232 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_stock_sentiment.py +249 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_trending_countries.py +292 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_trending_sectors.py +292 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/get_news_trending_stocks.py +325 -0
- adanos-1.0.0/src/adanos/_generated/api/news_stocks/search_news_stocks.py +196 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/compare_polymarket_stocks.py +248 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/get_polymarket_stats.py +152 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/get_polymarket_stock.py +249 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/get_polymarket_trending_countries.py +260 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/get_polymarket_trending_sectors.py +260 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/get_polymarket_trending_stocks.py +289 -0
- adanos-1.0.0/src/adanos/_generated/api/polymarket_stocks/search_polymarket_stocks.py +223 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/compare_reddit_crypto_tokens.py +248 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/get_reddit_crypto_stats.py +156 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/get_reddit_crypto_token.py +249 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/get_reddit_crypto_trending.py +268 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_crypto/search_reddit_crypto.py +214 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/compare_stocks.py +236 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_stats.py +152 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_stock_explanation.py +276 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_stock_sentiment.py +265 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_trending_countries.py +316 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_trending_sectors.py +316 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/get_trending_stocks.py +371 -0
- adanos-1.0.0/src/adanos/_generated/api/reddit_stocks/search_stocks.py +200 -0
- adanos-1.0.0/src/adanos/_generated/api/status/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/status/get_health.py +163 -0
- adanos-1.0.0/src/adanos/_generated/api/status/get_news_health.py +135 -0
- adanos-1.0.0/src/adanos/_generated/api/status/get_polymarket_health.py +163 -0
- adanos-1.0.0/src/adanos/_generated/api/status/get_reddit_crypto_health.py +135 -0
- adanos-1.0.0/src/adanos/_generated/api/status/get_x_health.py +163 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/__init__.py +1 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/compare_x_stocks.py +236 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/get_x_stats.py +180 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/get_x_stock_sentiment.py +293 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/get_x_trending_countries.py +301 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/get_x_trending_sectors.py +301 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/get_x_trending_stocks.py +356 -0
- adanos-1.0.0/src/adanos/_generated/api/x_twitter_stocks/search_x_stocks.py +196 -0
- adanos-1.0.0/src/adanos/_generated/client.py +282 -0
- adanos-1.0.0/src/adanos/_generated/errors.py +16 -0
- adanos-1.0.0/src/adanos/_generated/models/__init__.py +185 -0
- adanos-1.0.0/src/adanos/_generated/models/compare_response.py +84 -0
- adanos-1.0.0/src/adanos/_generated/models/compare_stock_item.py +128 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_compare_response.py +84 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_compare_token_item.py +128 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_health_response.py +180 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_scheduler_status.py +142 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_search_item.py +163 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_search_response.py +92 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_stats_response.py +86 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_token_sentiment.py +528 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_token_sentiment_daily_trend_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_token_sentiment_top_mentions_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_token_sentiment_top_subreddits_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_token_sentiment_trend_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_trending_token.py +168 -0
- adanos-1.0.0/src/adanos/_generated/models/crypto_trending_token_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/daily_trend_item.py +112 -0
- adanos-1.0.0/src/adanos/_generated/models/error_response.py +62 -0
- adanos-1.0.0/src/adanos/_generated/models/get_news_trending_stocks_type_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/get_polymarket_trending_stocks_type_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/get_trending_stocks_type_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/get_x_trending_stocks_type_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/health_response.py +180 -0
- adanos-1.0.0/src/adanos/_generated/models/historical_limit_error.py +68 -0
- adanos-1.0.0/src/adanos/_generated/models/historical_limit_error_detail.py +94 -0
- adanos-1.0.0/src/adanos/_generated/models/http_validation_error.py +80 -0
- adanos-1.0.0/src/adanos/_generated/models/news_compare_response.py +84 -0
- adanos-1.0.0/src/adanos/_generated/models/news_compare_stock_item.py +128 -0
- adanos-1.0.0/src/adanos/_generated/models/news_source_count.py +70 -0
- adanos-1.0.0/src/adanos/_generated/models/news_stock_sentiment.py +458 -0
- adanos-1.0.0/src/adanos/_generated/models/news_stock_sentiment_trend_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/news_top_mention.py +94 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_country.py +138 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_country_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_sector.py +138 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_sector_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_stock.py +154 -0
- adanos-1.0.0/src/adanos/_generated/models/news_trending_stock_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_compare_response.py +84 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_compare_stock_item.py +156 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_daily_trend_item.py +112 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_health_response.py +154 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_scheduler_status.py +131 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_search_response.py +92 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_search_result_item.py +171 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_stats_response.py +94 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_stock_detail_response.py +461 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_stock_detail_response_trend_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_top_mention.py +204 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_country.py +178 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_country_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_sector.py +178 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_sector_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_stock.py +192 -0
- adanos-1.0.0/src/adanos/_generated/models/polymarket_trending_stock_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/scheduler_status.py +142 -0
- adanos-1.0.0/src/adanos/_generated/models/search_response.py +92 -0
- adanos-1.0.0/src/adanos/_generated/models/search_result_item.py +203 -0
- adanos-1.0.0/src/adanos/_generated/models/stats_response.py +86 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_explanation_response.py +128 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_sentiment.py +523 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_sentiment_daily_trend_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_sentiment_top_mentions_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_sentiment_top_subreddits_type_0_item.py +46 -0
- adanos-1.0.0/src/adanos/_generated/models/stock_sentiment_trend_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_country.py +146 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_country_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_sector.py +146 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_sector_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_stock.py +170 -0
- adanos-1.0.0/src/adanos/_generated/models/trending_stock_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/validation_error.py +91 -0
- adanos-1.0.0/src/adanos/_generated/models/x_daily_trend_item.py +132 -0
- adanos-1.0.0/src/adanos/_generated/models/x_health_response.py +154 -0
- adanos-1.0.0/src/adanos/_generated/models/x_scheduler_status.py +131 -0
- adanos-1.0.0/src/adanos/_generated/models/x_stats_response.py +132 -0
- adanos-1.0.0/src/adanos/_generated/models/x_stock_detail_response.py +447 -0
- adanos-1.0.0/src/adanos/_generated/models/x_stock_detail_response_trend_type_0.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/x_top_tweet.py +180 -0
- adanos-1.0.0/src/adanos/_generated/models/x_trending_country.py +195 -0
- adanos-1.0.0/src/adanos/_generated/models/x_trending_country_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/x_trending_sector.py +195 -0
- adanos-1.0.0/src/adanos/_generated/models/x_trending_sector_trend.py +10 -0
- adanos-1.0.0/src/adanos/_generated/models/x_trending_stock.py +234 -0
- adanos-1.0.0/src/adanos/_generated/types.py +54 -0
- adanos-1.0.0/src/adanos/_wrapper.py +867 -0
- adanos-1.0.0/src/adanos/py.typed +0 -0
- adanos-1.0.0/tests/__init__.py +0 -0
- adanos-1.0.0/tests/test_wrapper.py +851 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main", "master"]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v5
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v6
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
cache: "pip"
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: python -m pip install ".[dev]"
|
|
22
|
+
|
|
23
|
+
- name: Run tests
|
|
24
|
+
run: python -m pytest tests -q
|
|
25
|
+
|
|
26
|
+
- name: Build wheel and sdist
|
|
27
|
+
run: python -m build
|
|
28
|
+
|
|
29
|
+
- name: Smoke install built SDK
|
|
30
|
+
run: |
|
|
31
|
+
python -m venv /tmp/adanos-python-sdk-smoke
|
|
32
|
+
/tmp/adanos-python-sdk-smoke/bin/pip install dist/adanos-*.whl
|
|
33
|
+
/tmp/adanos-python-sdk-smoke/bin/python - <<'PY'
|
|
34
|
+
from adanos import AdanosClient, __version__
|
|
35
|
+
|
|
36
|
+
assert __version__
|
|
37
|
+
client = AdanosClient(api_key="sk_live_example", base_url="https://api.adanos.org")
|
|
38
|
+
assert client.reddit is not None
|
|
39
|
+
assert client.news is not None
|
|
40
|
+
client.close()
|
|
41
|
+
PY
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: publish-pypi-${{ github.event.release.tag_name }}
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: pypi
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write
|
|
18
|
+
contents: read
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
with:
|
|
22
|
+
ref: ${{ github.event.release.tag_name }}
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
cache: "pip"
|
|
29
|
+
|
|
30
|
+
- name: Resolve package version
|
|
31
|
+
id: version
|
|
32
|
+
run: |
|
|
33
|
+
VERSION=$(python - <<'PY'
|
|
34
|
+
import re
|
|
35
|
+
from pathlib import Path
|
|
36
|
+
text = Path("src/adanos/__init__.py").read_text(encoding="utf-8")
|
|
37
|
+
print(re.search(r'__version__\s*=\s*"([^"]+)"', text).group(1))
|
|
38
|
+
PY
|
|
39
|
+
)
|
|
40
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
41
|
+
|
|
42
|
+
TAG="${{ github.event.release.tag_name }}"
|
|
43
|
+
if ! printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+'; then
|
|
44
|
+
echo "Release tag must use SemVer and start with v. Got: $TAG"
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
TAG_VERSION="${TAG#v}"
|
|
49
|
+
if [ "$TAG_VERSION" != "$VERSION" ]; then
|
|
50
|
+
echo "Release tag version ($TAG_VERSION) does not match package version ($VERSION)."
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
- name: Install dependencies
|
|
55
|
+
run: python -m pip install ".[dev]"
|
|
56
|
+
|
|
57
|
+
- name: Run tests
|
|
58
|
+
run: python -m pytest tests -q
|
|
59
|
+
|
|
60
|
+
- name: Build wheel and sdist
|
|
61
|
+
run: python -m build
|
|
62
|
+
|
|
63
|
+
- name: Validate package metadata
|
|
64
|
+
run: python -m twine check dist/*
|
|
65
|
+
|
|
66
|
+
- name: Smoke install built SDK
|
|
67
|
+
run: |
|
|
68
|
+
python -m venv /tmp/adanos-python-sdk-release-smoke
|
|
69
|
+
/tmp/adanos-python-sdk-release-smoke/bin/pip install dist/adanos-*.whl
|
|
70
|
+
/tmp/adanos-python-sdk-release-smoke/bin/python - <<'PY'
|
|
71
|
+
from adanos import AdanosClient, __version__
|
|
72
|
+
|
|
73
|
+
assert __version__
|
|
74
|
+
client = AdanosClient(api_key="sk_live_example", base_url="https://api.adanos.org")
|
|
75
|
+
assert client.reddit is not None
|
|
76
|
+
assert client.polymarket is not None
|
|
77
|
+
client.close()
|
|
78
|
+
PY
|
|
79
|
+
|
|
80
|
+
- name: Publish package to PyPI
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
82
|
+
with:
|
|
83
|
+
packages-dir: dist/
|
adanos-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.so
|
|
5
|
+
.Python
|
|
6
|
+
venv/
|
|
7
|
+
.venv/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
|
|
12
|
+
# Environment
|
|
13
|
+
.env
|
|
14
|
+
.env.local
|
|
15
|
+
.env.production
|
|
16
|
+
|
|
17
|
+
# Local maintainer docs
|
|
18
|
+
RELEASING.md
|
|
19
|
+
|
|
20
|
+
# IDE / OS
|
|
21
|
+
.idea/
|
|
22
|
+
.vscode/
|
|
23
|
+
*.swp
|
|
24
|
+
.DS_Store
|
|
25
|
+
Thumbs.db
|
|
26
|
+
|
|
27
|
+
# Tests and coverage
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.coverage
|
|
30
|
+
coverage_report/
|
|
31
|
+
htmlcov/
|
|
32
|
+
|
|
33
|
+
# Generated client caches
|
|
34
|
+
src/stocksentiment/_generated/.ruff_cache/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Adanos Python SDK will be documented in this file.
|
|
4
|
+
|
|
5
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
6
|
+
Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-03-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- First public release of `adanos` as a standalone Python SDK package.
|
|
12
|
+
- Standalone GitHub Actions CI for tests, build, and isolated wheel smoke installation.
|
|
13
|
+
- Standalone Trusted Publishing workflow for PyPI from this repository.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Renamed the PyPI package from `social-stock-sentiment` to `adanos`.
|
|
17
|
+
- Renamed the Python import path from `stocksentiment` to `adanos`.
|
|
18
|
+
- Renamed the primary client class from `StockSentimentClient` to `AdanosClient`.
|
|
19
|
+
- Package metadata now points to the public repository, API docs, and the new PyPI project.
|
|
20
|
+
- CI and release smoke tests now validate the renamed distribution and import path.
|
|
21
|
+
|
|
22
|
+
### Migration
|
|
23
|
+
- Replace `pip install social-stock-sentiment` with `pip install adanos`.
|
|
24
|
+
- Replace `from stocksentiment import StockSentimentClient` with `from adanos import AdanosClient`.
|
|
25
|
+
- `StockSentimentClient` remains available as a compatibility alias.
|
adanos-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alexander Schneider
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
adanos-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: adanos
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python SDK for the Adanos Finance Sentiment API
|
|
5
|
+
Project-URL: Homepage, https://adanos.org
|
|
6
|
+
Project-URL: API_Docs, https://api.adanos.org/docs
|
|
7
|
+
Project-URL: Documentation, https://github.com/adanos-software/adanos-python-sdk#readme
|
|
8
|
+
Project-URL: Repository, https://github.com/adanos-software/adanos-python-sdk
|
|
9
|
+
Project-URL: Issues, https://github.com/adanos-software/adanos-python-sdk/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/adanos-software/adanos-python-sdk/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: PyPI, https://pypi.org/project/adanos/
|
|
12
|
+
Author: Alexander Schneider
|
|
13
|
+
License-Expression: MIT
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Keywords: api,finance,news,polymarket,reddit,sentiment,stocks,x
|
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Requires-Dist: attrs>=22.2
|
|
29
|
+
Requires-Dist: httpx<1,>=0.23
|
|
30
|
+
Requires-Dist: python-dateutil>=2.8
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
35
|
+
Requires-Dist: respx>=0.22; extra == 'dev'
|
|
36
|
+
Requires-Dist: twine>=6; extra == 'dev'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# adanos
|
|
40
|
+
|
|
41
|
+
`adanos` is the public Python SDK for the [Adanos Finance Sentiment API](https://api.adanos.org/docs).
|
|
42
|
+
|
|
43
|
+
It gives you typed access to:
|
|
44
|
+
- Reddit stock sentiment
|
|
45
|
+
- News sentiment and source-filtered rankings
|
|
46
|
+
- X/Twitter stock sentiment
|
|
47
|
+
- Polymarket stock activity and market attention
|
|
48
|
+
- Reddit crypto sentiment
|
|
49
|
+
|
|
50
|
+
Links:
|
|
51
|
+
- Source: https://github.com/adanos-software/adanos-python-sdk
|
|
52
|
+
- PyPI: https://pypi.org/project/adanos/
|
|
53
|
+
- API docs: https://api.adanos.org/docs
|
|
54
|
+
- Homepage: https://adanos.org
|
|
55
|
+
|
|
56
|
+
Package and import:
|
|
57
|
+
- PyPI package: `adanos`
|
|
58
|
+
- Python import: `adanos`
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python3 -m pip install adanos
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from adanos import AdanosClient
|
|
70
|
+
|
|
71
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
72
|
+
|
|
73
|
+
trending = client.reddit.trending(days=7, limit=10)
|
|
74
|
+
tsla = client.reddit.stock("TSLA", days=14)
|
|
75
|
+
explanation = client.reddit.explain("TSLA")
|
|
76
|
+
|
|
77
|
+
print(trending[0].ticker)
|
|
78
|
+
print(tsla.buzz_score)
|
|
79
|
+
print(explanation.explanation)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## What You Can Do
|
|
83
|
+
|
|
84
|
+
- Rank trending stocks across Reddit, News, X, and Polymarket
|
|
85
|
+
- Pull detailed ticker reports for a fixed lookback window
|
|
86
|
+
- Search and compare tickers across datasets
|
|
87
|
+
- Generate AI-written explanations for Reddit and News stock trends
|
|
88
|
+
- Track Reddit crypto tokens via the same client
|
|
89
|
+
- Use sync or async methods without changing the namespace structure
|
|
90
|
+
|
|
91
|
+
## Namespaces
|
|
92
|
+
|
|
93
|
+
- `client.reddit.*` for Reddit Stocks
|
|
94
|
+
- `client.news.*` for News Stocks
|
|
95
|
+
- `client.x.*` for X/Twitter Stocks
|
|
96
|
+
- `client.polymarket.*` for Polymarket Stocks
|
|
97
|
+
- `client.crypto.*` for Reddit Crypto
|
|
98
|
+
- `client.reddit_crypto.*` is an alias for `client.crypto.*`
|
|
99
|
+
|
|
100
|
+
## Examples
|
|
101
|
+
|
|
102
|
+
### Reddit Stocks
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from adanos import AdanosClient
|
|
106
|
+
|
|
107
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
108
|
+
|
|
109
|
+
trending = client.reddit.trending(days=7, limit=10)
|
|
110
|
+
sectors = client.reddit.trending_sectors(days=7, limit=10)
|
|
111
|
+
countries = client.reddit.trending_countries(days=7, limit=10)
|
|
112
|
+
tsla = client.reddit.stock("TSLA", days=14)
|
|
113
|
+
explanation = client.reddit.explain("TSLA")
|
|
114
|
+
results = client.reddit.search("Tesla")
|
|
115
|
+
comparison = client.reddit.compare(["TSLA", "AAPL", "MSFT"], days=7)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### News
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from adanos import AdanosClient
|
|
122
|
+
|
|
123
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
124
|
+
|
|
125
|
+
news_trending = client.news.trending(days=7, source="reuters")
|
|
126
|
+
sectors = client.news.trending_sectors(days=7, source="reuters")
|
|
127
|
+
countries = client.news.trending_countries(days=7, source="reuters")
|
|
128
|
+
nvda = client.news.stock("NVDA", days=7)
|
|
129
|
+
explanation = client.news.explain("NVDA")
|
|
130
|
+
results = client.news.search("Nvidia")
|
|
131
|
+
comparison = client.news.compare(["NVDA", "AAPL"], days=7)
|
|
132
|
+
stats = client.news.stats()
|
|
133
|
+
health = client.news.health()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### X/Twitter
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
from adanos import AdanosClient
|
|
140
|
+
|
|
141
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
142
|
+
|
|
143
|
+
x_trending = client.x.trending(days=1, limit=20)
|
|
144
|
+
sectors = client.x.trending_sectors(days=1, limit=10)
|
|
145
|
+
countries = client.x.trending_countries(days=1, limit=10)
|
|
146
|
+
nvda = client.x.stock("NVDA")
|
|
147
|
+
results = client.x.search("Nvidia")
|
|
148
|
+
comparison = client.x.compare(["NVDA", "AMD"], days=7)
|
|
149
|
+
stats = client.x.stats()
|
|
150
|
+
health = client.x.health()
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Polymarket
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from adanos import AdanosClient
|
|
157
|
+
|
|
158
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
159
|
+
|
|
160
|
+
pm_trending = client.polymarket.trending(days=7, limit=20, type="stock")
|
|
161
|
+
sectors = client.polymarket.trending_sectors(days=7, limit=10)
|
|
162
|
+
countries = client.polymarket.trending_countries(days=7, limit=10)
|
|
163
|
+
aapl = client.polymarket.stock("AAPL")
|
|
164
|
+
results = client.polymarket.search("Apple")
|
|
165
|
+
comparison = client.polymarket.compare(["AAPL", "TSLA"], days=7)
|
|
166
|
+
stats = client.polymarket.stats()
|
|
167
|
+
health = client.polymarket.health()
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Polymarket semantics:
|
|
171
|
+
- `buzz_score` is activity-first and optimized for current market attention
|
|
172
|
+
- `total_liquidity` is a windowed signal over the selected `days`
|
|
173
|
+
- `top_mentions` on `stock()` are relevance-sorted by trading activity first
|
|
174
|
+
|
|
175
|
+
### Reddit Crypto
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from adanos import AdanosClient
|
|
179
|
+
|
|
180
|
+
client = AdanosClient(api_key="sk_live_...")
|
|
181
|
+
|
|
182
|
+
trending = client.crypto.trending(days=7, limit=20)
|
|
183
|
+
btc = client.crypto.token("BTC", days=14)
|
|
184
|
+
results = client.crypto.search("bitcoin")
|
|
185
|
+
comparison = client.crypto.compare(["BTC", "ETH"], days=7)
|
|
186
|
+
stats = client.crypto.stats()
|
|
187
|
+
health = client.crypto.health()
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Available Methods
|
|
191
|
+
|
|
192
|
+
### `client.reddit.*`
|
|
193
|
+
|
|
194
|
+
| Method | Description |
|
|
195
|
+
|--------|-------------|
|
|
196
|
+
| `trending(days, limit, offset, type)` | Trending stocks by buzz score |
|
|
197
|
+
| `trending_sectors(days, limit, offset)` | Trending sectors |
|
|
198
|
+
| `trending_countries(days, limit, offset)` | Trending countries |
|
|
199
|
+
| `stock(ticker, days)` | Detailed sentiment for a ticker |
|
|
200
|
+
| `explain(ticker)` | AI-generated trend explanation |
|
|
201
|
+
| `search(query)` | Search stocks by name or ticker |
|
|
202
|
+
| `compare(tickers, days)` | Compare up to 10 stocks |
|
|
203
|
+
| `stats()` | Dataset statistics |
|
|
204
|
+
| `health()` | Public service health |
|
|
205
|
+
|
|
206
|
+
### `client.news.*`
|
|
207
|
+
|
|
208
|
+
| Method | Description |
|
|
209
|
+
|--------|-------------|
|
|
210
|
+
| `trending(days, limit, offset, type, source)` | Trending stocks from news |
|
|
211
|
+
| `trending_sectors(days, limit, offset, source)` | Trending sectors from news |
|
|
212
|
+
| `trending_countries(days, limit, offset, source)` | Trending countries from news |
|
|
213
|
+
| `stock(ticker, days)` | Detailed news sentiment for a ticker |
|
|
214
|
+
| `explain(ticker)` | AI-generated explanation from news context |
|
|
215
|
+
| `search(query)` | Search stocks in the news dataset |
|
|
216
|
+
| `compare(tickers, days)` | Compare up to 10 stocks in news |
|
|
217
|
+
| `stats()` | News dataset statistics |
|
|
218
|
+
| `health()` | Public news service health |
|
|
219
|
+
|
|
220
|
+
### `client.x.*`
|
|
221
|
+
|
|
222
|
+
| Method | Description |
|
|
223
|
+
|--------|-------------|
|
|
224
|
+
| `trending(days, limit, offset, type)` | Trending stocks on X/Twitter |
|
|
225
|
+
| `trending_sectors(days, limit, offset)` | Trending sectors |
|
|
226
|
+
| `trending_countries(days, limit, offset)` | Trending countries |
|
|
227
|
+
| `stock(ticker, days)` | Detailed X/Twitter sentiment |
|
|
228
|
+
| `search(query)` | Search stocks |
|
|
229
|
+
| `compare(tickers, days)` | Compare stocks |
|
|
230
|
+
| `stats()` | Dataset statistics |
|
|
231
|
+
| `health()` | Public service health |
|
|
232
|
+
|
|
233
|
+
### `client.polymarket.*`
|
|
234
|
+
|
|
235
|
+
| Method | Description |
|
|
236
|
+
|--------|-------------|
|
|
237
|
+
| `trending(days, limit, offset, type)` | Trending stocks on Polymarket with activity-first buzz and windowed liquidity |
|
|
238
|
+
| `trending_sectors(days, limit, offset)` | Trending sectors |
|
|
239
|
+
| `trending_countries(days, limit, offset)` | Trending countries |
|
|
240
|
+
| `stock(ticker, days)` | Detailed Polymarket activity, sentiment, and relevance-sorted market questions |
|
|
241
|
+
| `search(query)` | Search stocks |
|
|
242
|
+
| `compare(tickers, days)` | Compare stocks with windowed Polymarket activity signals |
|
|
243
|
+
| `stats()` | Dataset statistics |
|
|
244
|
+
| `health()` | Public service health |
|
|
245
|
+
|
|
246
|
+
### `client.crypto.*`
|
|
247
|
+
|
|
248
|
+
| Method | Description |
|
|
249
|
+
|--------|-------------|
|
|
250
|
+
| `trending(days, limit, offset)` | Trending Reddit crypto tokens |
|
|
251
|
+
| `token(symbol, days)` | Detailed token sentiment and buzz |
|
|
252
|
+
| `search(query)` | Search tokens by symbol or name |
|
|
253
|
+
| `compare(symbols, days)` | Compare multiple tokens |
|
|
254
|
+
| `stats()` | Dataset statistics |
|
|
255
|
+
| `health()` | Public service health |
|
|
256
|
+
|
|
257
|
+
## Async Usage
|
|
258
|
+
|
|
259
|
+
Every namespace method also has an `_async` variant.
|
|
260
|
+
|
|
261
|
+
```python
|
|
262
|
+
import asyncio
|
|
263
|
+
|
|
264
|
+
from adanos import AdanosClient
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
async def main() -> None:
|
|
268
|
+
async with AdanosClient(api_key="sk_live_...") as client:
|
|
269
|
+
trending = await client.reddit.trending_async(days=7)
|
|
270
|
+
tsla = await client.reddit.stock_async("TSLA")
|
|
271
|
+
explanation = await client.news.explain_async("NVDA")
|
|
272
|
+
print(trending[0].ticker)
|
|
273
|
+
print(tsla.trend)
|
|
274
|
+
print(explanation.explanation)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
asyncio.run(main())
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Authentication and Configuration
|
|
281
|
+
|
|
282
|
+
Get an API key at https://api.adanos.org/docs
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
from adanos import AdanosClient
|
|
286
|
+
|
|
287
|
+
client = AdanosClient(
|
|
288
|
+
api_key="sk_live_...",
|
|
289
|
+
base_url="https://api.adanos.org",
|
|
290
|
+
timeout=60.0,
|
|
291
|
+
)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Notes:
|
|
295
|
+
- `api_key` is required for protected endpoints
|
|
296
|
+
- `base_url` lets you target another deployment or staging environment
|
|
297
|
+
- `timeout` is passed through to the underlying `httpx` client
|
|
298
|
+
- the SDK does not auto-load local CLI profiles or env-specific config files
|
|
299
|
+
|
|
300
|
+
Context management:
|
|
301
|
+
|
|
302
|
+
```python
|
|
303
|
+
from adanos import AdanosClient
|
|
304
|
+
|
|
305
|
+
with AdanosClient(api_key="sk_live_...") as client:
|
|
306
|
+
print(client.reddit.health())
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
## Errors and Responses
|
|
310
|
+
|
|
311
|
+
- The SDK returns typed models from the generated OpenAPI client
|
|
312
|
+
- Documented API errors are returned as typed error models
|
|
313
|
+
- Undocumented statuses raise `UnexpectedStatus`
|
|
314
|
+
- For long-lived processes, use `with`, `async with`, `close()`, or `aclose()` to release HTTP resources
|
|
315
|
+
|
|
316
|
+
## Rate Limits
|
|
317
|
+
|
|
318
|
+
Typical platform limits:
|
|
319
|
+
|
|
320
|
+
| Tier | Monthly Requests | Burst Limit |
|
|
321
|
+
|------|------------------|-------------|
|
|
322
|
+
| Free | 250 | 100/min |
|
|
323
|
+
| Paid | Unlimited | 1000/min |
|
|
324
|
+
|
|
325
|
+
See the live API docs for the current contract and plan details.
|
|
326
|
+
|
|
327
|
+
## Migration from `social-stock-sentiment`
|
|
328
|
+
|
|
329
|
+
Version `1.0.0` starts the new `adanos` package line and renames both the PyPI package and the Python import path.
|
|
330
|
+
|
|
331
|
+
Old:
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
python3 -m pip install social-stock-sentiment
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
```python
|
|
338
|
+
from stocksentiment import StockSentimentClient
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
New:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
python3 -m pip install adanos
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
```python
|
|
348
|
+
from adanos import AdanosClient
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The client API and namespace layout stay the same. Most upgrades only need a dependency rename and an import rewrite.
|
|
352
|
+
|
|
353
|
+
`AdanosClient` is now the primary public client name. `StockSentimentClient` remains available as a compatibility alias.
|
|
354
|
+
|
|
355
|
+
If you adopted the pre-release `adanos-python-sdk` naming locally, switch that install/import pair too:
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
python3 -m pip uninstall adanos-python-sdk
|
|
359
|
+
python3 -m pip install adanos
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
```python
|
|
363
|
+
from adanos import AdanosClient
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Development
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
python3 -m pip install -e ".[dev]"
|
|
370
|
+
python3 -m pytest tests -q
|
|
371
|
+
python3 -m build
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
## License
|
|
375
|
+
|
|
376
|
+
MIT
|