Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
333 lines (282 loc) · 9.63 KB
/
Copy pathindex.html
File metadata and controls
333 lines (282 loc) · 9.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OilPriceAPI Python SDK - Source-Timestamped Commodity Data</title>
<meta name="description" content="Official Python SDK for source-timestamped oil, gas, and commodity price data with typed responses and explicit source context.">
<meta name="keywords" content="python oil prices, commodity data python, oil price api, python energy data, brent crude python, wti python sdk">
<!-- Open Graph -->
<meta property="og:title" content="OilPriceAPI Python SDK">
<meta property="og:description" content="Source-timestamped oil and commodity data for Python developers">
<meta property="og:type" content="website">
<meta property="og:url" content="https://oilpriceapi.github.io/python-sdk/">
<!-- Plausible Analytics -->
<script defer data-domain="oilpriceapi.github.io" src="https://plausible.io/js/script.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Hero Section */
.hero {
background: white;
border-radius: 10px;
padding: 60px 40px;
margin: 40px 0;
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
text-align: center;
}
.hero h1 {
font-size: 3em;
color: #2c3e50;
margin-bottom: 20px;
}
.hero .tagline {
font-size: 1.5em;
color: #7f8c8d;
margin-bottom: 30px;
}
.cta-buttons {
margin: 30px 0;
}
.btn {
display: inline-block;
padding: 15px 30px;
margin: 0 10px;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
transition: transform 0.2s;
}
.btn:hover {
transform: translateY(-2px);
}
.btn-primary {
background: #667eea;
color: white;
}
.btn-secondary {
background: #34495e;
color: white;
}
/* Features Grid */
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
margin: 40px 0;
}
.feature-card {
background: white;
border-radius: 10px;
padding: 30px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.feature-card h3 {
color: #667eea;
margin-bottom: 15px;
}
/* Code Example */
.code-section {
background: #2c3e50;
border-radius: 10px;
padding: 30px;
margin: 40px 0;
color: white;
}
.code-section h2 {
margin-bottom: 20px;
}
pre {
background: #34495e;
padding: 20px;
border-radius: 5px;
overflow-x: auto;
}
code {
color: #2ecc71;
font-family: 'Courier New', monospace;
}
/* Stats */
.stats {
display: flex;
justify-content: space-around;
background: white;
border-radius: 10px;
padding: 40px;
margin: 40px 0;
}
.stat {
text-align: center;
}
.stat-number {
font-size: 3em;
font-weight: bold;
color: #667eea;
}
.stat-label {
color: #7f8c8d;
font-size: 1.1em;
}
/* Pricing */
.pricing {
background: white;
border-radius: 10px;
padding: 40px;
margin: 40px 0;
}
.pricing h2 {
text-align: center;
margin-bottom: 30px;
color: #2c3e50;
}
.pricing-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.pricing-card {
border: 2px solid #ecf0f1;
border-radius: 10px;
padding: 30px;
text-align: center;
}
.pricing-card.featured {
border-color: #667eea;
transform: scale(1.05);
}
.price {
font-size: 2.5em;
font-weight: bold;
color: #667eea;
}
/* Footer */
footer {
text-align: center;
padding: 40px;
color: white;
}
footer a {
color: white;
text-decoration: none;
border-bottom: 1px solid white;
}
</style>
</head>
<body>
<div class="container">
<!-- Hero -->
<div class="hero">
<h1>🛢️ OilPriceAPI Python SDK</h1>
<p class="tagline">Source-timestamped oil and commodity data for Python developers</p>
<p>Typed API access with explicit currency, unit, source, and timestamp context</p>
<div class="cta-buttons">
<a href="https://pypi.org/project/oilpriceapi/" class="btn btn-primary">Install from PyPI</a>
<a href="https://oilpriceapi.com/auth/signup" class="btn btn-secondary">Create API Key</a>
</div>
<pre><code>pip install oilpriceapi</code></pre>
</div>
<!-- Stats -->
<div class="stats">
<div class="stat">
<div class="stat-number">1,000+</div>
<div class="stat-label">Downloads/Month</div>
</div>
<div class="stat">
<div class="stat-number">20+</div>
<div class="stat-label">Commodities</div>
</div>
<div class="stat">
<div class="stat-number">20</div>
<div class="stat-label">Years of Data</div>
</div>
</div>
<!-- Features -->
<div class="features">
<div class="feature-card">
<h3>⚡ Source-Timestamped Prices</h3>
<p>Latest available spot records include source and timestamp context for freshness decisions.</p>
</div>
<div class="feature-card">
<h3>📊 Historical Data</h3>
<p>20+ years of daily price history. Perfect for backtesting, analysis, and forecasting.</p>
</div>
<div class="feature-card">
<h3>🐼 Pandas Integration</h3>
<p>Native pandas DataFrame support. Time-series analysis made easy.</p>
</div>
<div class="feature-card">
<h3>⚙️ Type-Safe</h3>
<p>Full type hints for autocomplete in your IDE. Catch errors before runtime.</p>
</div>
<div class="feature-card">
<h3>🔄 Async Support</h3>
<p>Built-in async client for high-performance applications.</p>
</div>
<div class="feature-card">
<h3>✅ Well-Tested</h3>
<p>98% test coverage. Production-ready and reliable.</p>
</div>
</div>
<!-- Code Example -->
<div class="code-section">
<h2>Quick Start</h2>
<pre><code>from oilpriceapi import OilPriceAPI
# Initialize client
client = OilPriceAPI() # Uses OILPRICEAPI_KEY env var
# Get latest Brent Crude price
brent = client.prices.get("BRENT_CRUDE_USD")
print(f"Brent Crude: ${brent.value:.2f}")
# Output: Brent Crude: $71.45
# Get historical data as pandas DataFrame
df = client.prices.past_year("WTI_USD", as_dataframe=True)
print(df.describe())
# Async support
from oilpriceapi import AsyncOilPriceAPI
async with AsyncOilPriceAPI() as client:
prices = await client.prices.get_multiple([
"BRENT_CRUDE_USD",
"WTI_USD",
"NATURAL_GAS_USD"
])
</code></pre>
</div>
<!-- Resources -->
<div class="features">
<div class="feature-card">
<h3>📚 Documentation</h3>
<p><a href="https://docs.oilpriceapi.com/sdk/python">Full API Reference</a></p>
<p><a href="https://github.com/oilpriceapi/python-sdk/blob/main/EXAMPLES.md">Code Examples</a></p>
</div>
<div class="feature-card">
<h3>🐙 GitHub</h3>
<p><a href="https://github.com/oilpriceapi/python-sdk">Source Code</a></p>
<p><a href="https://github.com/oilpriceapi/python-sdk/issues">Report Issues</a></p>
</div>
<div class="feature-card">
<h3>💬 Support</h3>
<p><a href="mailto:support@oilpriceapi.com">Email Support</a></p>
<p><a href="https://oilpriceapi.com/pricing">View Pricing</a></p>
</div>
</div>
</div>
<footer>
<p>Built with ❤️ by <a href="https://oilpriceapi.com">OilPriceAPI</a></p>
<p>
<a href="https://github.com/oilpriceapi/python-sdk">GitHub</a> •
<a href="https://pypi.org/project/oilpriceapi/">PyPI</a> •
<a href="https://oilpriceapi.com/privacy">Privacy</a> •
<a href="https://oilpriceapi.com/terms">Terms</a>
</p>
</footer>
</body>
</html>