Analysis Date: January 7, 2025 Repository: https://github.com/OilpriceAPI/python-sdk PyPI: https://pypi.org/project/oilpriceapi/
| Metric | Value | Status |
|---|---|---|
| PyPI Downloads (Last Month) | 216 | ✅ Good |
| PyPI Downloads (Last Week) | 125 | ✅ Good |
| PyPI Downloads (Yesterday) | 2 | |
| GitHub Stars | 0 | 🔴 CRITICAL |
| GitHub Forks | 0 | 🔴 CRITICAL |
| GitHub Watchers | 0 | 🔴 CRITICAL |
| Repository Age | 9 days (created Sep 29, 2025) | ℹ️ Brand new |
| Actual SDK Users (API Database) | 0 | 🔴 CRITICAL |
| Test Coverage | 64.48% |
216 downloads but 0 actual users detected in API calls!
This means one of two things:
- ❌ Backend not tracking SDK usage - SDK sends User-Agent but backend doesn't parse it
- ❌ People download but don't use - Activation problem
Investigation shows: SDK correctly sends User-Agent: "OilPriceAPI-Python/1.0.0" but backend's sdk_language and sdk_version columns are NULL for all requests.
Problem: 0 stars, 0 forks, 0 watchers = No credibility
Why it matters:
- Developers check stars before using a package
- 0 stars signals "untested" or "abandoned"
- PyPI users see "No stars" and skip it
Solutions:
# Internal team
- You + team members star the repo (5-10 stars)
- Post on company Slack/Discord for initial stars
- Ask early customers to star it
# Quick win: 10-20 stars makes it look legitimate- Post on r/Python, r/algotrading, r/datascience
- Share on HackerNews "Show HN: Python SDK for oil price data"
- Post on X/Twitter with code sample
- Share in energy/trading Discord servers
Expected Result: 50-100 stars in first month gives credibility
Problem: README has test badge but workflow doesn't exist
Current Badge Status:
[]This links to: https://github.com/oilpriceapi/python-sdk/actions/workflows/test.yml
Result: "This workflow does not exist"
Impact:
- Badge shows broken/no status
- No CI/CD confidence
- PRs can't be auto-verified
Solution: Create .github/workflows/test.yml
Problem: SDK sends User-Agent: "OilPriceAPI-Python/1.0.0" but backend doesn't populate sdk_language and sdk_version columns.
Evidence:
- 212 API users in last 30 days
- 0 SDK users detected
- All
sdk_languagefields are NULL
Backend Fix Needed: Parse User-Agent header and extract SDK info:
# In request tracking middleware
user_agent = request.headers['User-Agent']
if user_agent =~ /OilPriceAPI-Python\/(.+)/
sdk_language = 'python'
sdk_version = $1
endThis is a backend issue, not SDK issue.
Current Badges:
| Badge | Status | Action |
|---|---|---|
| PyPI version | ✅ Working | None |
| Python versions | ✅ Working | None |
| Tests | 🔴 Broken | Create test.yml workflow |
| Coverage | Set up Codecov | |
| License | ✅ Working | None |
| Website | ✅ Working | None (just added) |
| Docs | ✅ Working | None (just added) |
| Sign Up | ✅ Working | None (just added) |
Problem: Tests exist (64% coverage) but don't run on PRs/commits
Impact:
- Can't catch bugs before release
- No confidence in changes
- Manual testing required
Solution: Add test workflow (provided below)
Problem: README references examples/ directory but it's empty or missing
Check out the [examples/](https://github.com/OilpriceAPI/python-sdk/tree/main/examples/) directory for:
- [Quickstart Notebook](examples/quickstart.ipynb)
- [Data Analysis](examples/data_analysis.ipynb)
- [Trading Signals](examples/trading_signals.ipynb)
- [Async Operations](examples/async_example.py)Reality: These files don't exist in the repo!
Solution: Create the example files or remove references
Problem:
"User-Agent": "OilPriceAPI-Python/1.0.0",Version is hardcoded in client.py. Should read from __version__ variable.
Solution:
from . import __version__
"User-Agent": f"OilPriceAPI-Python/{__version__}",Problem: How to release a new version isn't documented
Solution: Create RELEASE.md with:
- Update version in pyproject.toml
- Update CHANGELOG.md
- Create GitHub release
- GitHub Action auto-publishes to PyPI
Current: EXAMPLES.md has great content but no actual runnable code files
Add:
examples/quickstart.py- Simple first useexamples/trading_strategy.py- MA crossover exampleexamples/data_analysis.ipynb- Jupyter notebookexamples/async_batch.py- Async example
Current: 64.48% coverage Target: 80%+
Focus on:
- Error handling paths
- Retry logic
- Edge cases
Create benchmarks/ directory with:
- Request throughput testing
- Async vs sync comparison
- Caching performance
Impact: Massive for adoption
Create:
- 2-3 minute YouTube video
- "Get oil prices in Python in 60 seconds"
- Embed in README and docs
Add support for:
- pandas-datareader integration
- yfinance-style interface
- Jupyter widgets for live prices
- Plotly/dash components
Day 1-2:
- Create test.yml workflow (30 min) - Fix broken badge
- Get 10-20 initial stars (2 hours) - Team + friends
- Create examples/ files (2 hours) - Match README promises
Day 3-4:
- Set up Codecov (1 hour) - Fix coverage badge
- Fix SDK version to use version (15 min)
- Document release process (30 min)
Day 5-7:
- Backend fix for SDK tracking (Backend team - 1 hour)
- Promote on social media (2 hours) - Reddit, HN, Twitter
- Add to awesome-python lists (1 hour)
Expected Result:
- ✅ All badges working
- ✅ 20-50 GitHub stars
- ✅ SDK usage visible in database
- Write blog post: "Analyzing oil prices with Python"
- Create YouTube tutorial video
- Improve test coverage to 80%
- Add performance benchmarks
- Create Jupyter notebook examples
Expected Result:
- 50-100 GitHub stars
- 500+ PyPI downloads/month
- 10-20 active SDK users
- pandas-datareader integration
- Real-time streaming support
- CLI enhancements
- Plotly/Dash components
- Enterprise features (connection pooling, etc.)
Expected Result:
- 200+ GitHub stars
- 1,000+ PyPI downloads/month
- 50+ active SDK users
- Featured in Python data newsletters
File: .github/workflows/test.yml
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint with ruff
run: ruff check oilpriceapi tests
- name: Type check with mypy
run: mypy oilpriceapi
continue-on-error: true # Don't fail on type errors initially
- name: Run tests with coverage
run: |
pytest --cov=oilpriceapi --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
with:
file: ./coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}"""
Quickstart Example for OilPriceAPI Python SDK
Get started in 60 seconds with real-time oil prices.
"""
from oilpriceapi import OilPriceAPI
import os
# Initialize client with your API key
# Get your free API key at https://oilpriceapi.com/auth/signup
client = OilPriceAPI(api_key=os.getenv("OILPRICEAPI_KEY"))
# Get latest Brent Crude price
brent = client.prices.get("BRENT_CRUDE_USD")
print(f"Brent Crude: ${brent.value:.2f}")
print(f"24h change: {brent.change_24h_pct:+.2f}%")
# Get multiple commodities at once
commodities = ["BRENT_CRUDE_USD", "WTI_USD", "NATURAL_GAS_USD"]
prices = client.prices.get_multiple(commodities)
for price in prices:
print(f"{price.commodity}: ${price.value:.2f} ({price.change_24h_pct:+.2f}%)")"""
Historical Data Analysis Example
Download and analyze historical oil price data.
"""
from oilpriceapi import OilPriceAPI
import matplotlib.pyplot as plt
import os
client = OilPriceAPI(api_key=os.getenv("OILPRICEAPI_KEY"))
# Get 1 year of Brent Crude historical data
df = client.prices.to_dataframe(
commodity="BRENT_CRUDE_USD",
start="2024-01-01",
end="2024-12-31",
interval="daily"
)
# Calculate moving averages
df['SMA_20'] = df['close'].rolling(window=20).mean()
df['SMA_50'] = df['close'].rolling(window=50).mean()
# Plot
plt.figure(figsize=(12, 6))
plt.plot(df['date'], df['close'], label='Brent Crude', linewidth=2)
plt.plot(df['date'], df['SMA_20'], label='20-day MA', linestyle='--')
plt.plot(df['date'], df['SMA_50'], label='50-day MA', linestyle='--')
plt.title('Brent Crude Price with Moving Averages')
plt.xlabel('Date')
plt.ylabel('Price (USD)')
plt.legend()
plt.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('brent_analysis.png', dpi=300)
print("Chart saved to brent_analysis.png")
# Print statistics
print(f"\nPrice Statistics:")
print(f"Average: ${df['close'].mean():.2f}")
print(f"Min: ${df['close'].min():.2f}")
print(f"Max: ${df['close'].max():.2f}")
print(f"Volatility (std dev): ${df['close'].std():.2f}")- 216 downloads/month
- 0 active users
- 0 GitHub stars = 0 credibility
- 500-1,000 downloads/month (+130-360%)
- 20-50 active SDK users
- 50-100 GitHub stars
- Result: 10-20 new signups via SDK
- 2,000-5,000 downloads/month
- 100-200 active SDK users
- 200-500 GitHub stars
- Result: 50-100 new signups via SDK
- Estimated ARR: $1,500-$3,000 from SDK-driven signups
- Week 1 fixes: 8-12 hours
- Week 2-3 growth: 10-15 hours
- Total: 20-30 hours (2.5-4 days)
ROI: $1,500-$3,000 ARR / 30 hours = $50-$100 per hour invested
Immediate (This Week):
- Create test.yml workflow
- Get 10-20 initial stars from team/customers
- Create example files
- Fix backend SDK tracking
Short-term (Next 2 Weeks): 5. Set up Codecov 6. Promote on social media 7. Write blog post 8. Create video tutorial
Long-term (Next 3 Months): 9. Improve coverage to 80% 10. Add advanced features 11. Integration with pandas-datareader 12. Regular content marketing
Questions or need help implementing? Email: support@oilpriceapi.com GitHub Issues: https://github.com/OilpriceAPI/python-sdk/issues
Last Updated: January 7, 2025