-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2186762
Showing
7 changed files
with
710 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/ | ||
|
||
# CMake | ||
cmake-build-debug/ | ||
|
||
# Mongo Explorer plugin: | ||
.idea/**/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${file}", | ||
"cwd": "${workspaceRoot}", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "PySpark", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"osx": { | ||
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit" | ||
}, | ||
"windows": { | ||
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd" | ||
}, | ||
"linux": { | ||
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit" | ||
}, | ||
"program": "${file}", | ||
"cwd": "${workspaceRoot}", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "Python Module", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"module": "module.name", | ||
"cwd": "${workspaceRoot}", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "Integrated Terminal/Console", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${file}", | ||
"cwd": "", | ||
"console": "integratedTerminal", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit" | ||
] | ||
}, | ||
{ | ||
"name": "External Terminal/Console", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${file}", | ||
"cwd": "", | ||
"console": "externalTerminal", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit" | ||
] | ||
}, | ||
{ | ||
"name": "Django", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${workspaceRoot}/manage.py", | ||
"cwd": "${workspaceRoot}", | ||
"args": [ | ||
"runserver", | ||
"--noreload" | ||
], | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput", | ||
"DjangoDebugging" | ||
] | ||
}, | ||
{ | ||
"name": "Flask", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": false, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter", | ||
"cwd": "${workspaceRoot}", | ||
"env": { | ||
"FLASK_APP": "${workspaceRoot}/quickstart/app.py" | ||
}, | ||
"args": [ | ||
"run", | ||
"--no-debugger", | ||
"--no-reload" | ||
], | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "Flask (old)", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": false, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${workspaceRoot}/run.py", | ||
"cwd": "${workspaceRoot}", | ||
"args": [], | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "Pyramid", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"cwd": "${workspaceRoot}", | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"args": [ | ||
"${workspaceRoot}/development.ini" | ||
], | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput", | ||
"Pyramid" | ||
] | ||
}, | ||
{ | ||
"name": "Watson", | ||
"type": "python", | ||
"request": "launch", | ||
"stopOnEntry": true, | ||
"pythonPath": "${config:python.pythonPath}", | ||
"program": "${workspaceRoot}/console.py", | ||
"cwd": "${workspaceRoot}", | ||
"args": [ | ||
"dev", | ||
"runserver", | ||
"--noreload=True" | ||
], | ||
"env": {}, | ||
"envFile": "${workspaceRoot}/.env", | ||
"debugOptions": [ | ||
"WaitOnAbnormalExit", | ||
"WaitOnNormalExit", | ||
"RedirectOutput" | ||
] | ||
}, | ||
{ | ||
"name": "Attach (Remote Debug)", | ||
"type": "python", | ||
"request": "attach", | ||
"localRoot": "${workspaceRoot}", | ||
"remoteRoot": "${workspaceRoot}", | ||
"port": 3000, | ||
"secret": "my_secret", | ||
"host": "localhost" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Python client for Barchart OnDemand | ||
|
||
Get access to market data and the OnDemand APIs in just a few lines of code. | ||
|
||
### Installation | ||
|
||
``` | ||
python setup.py install | ||
``` | ||
|
||
### Usage | ||
|
||
```python | ||
import ondemand | ||
|
||
od = ondemand.OnDemandClient(api_key='CHANGE_ME') | ||
|
||
# get quote data for Apple and Microsoft | ||
quotes = od.quote('AAPL,MSFT')['results'] | ||
|
||
for q in quotes: | ||
print('Symbol: %s, Last Price: %s' % (q['symbol'], q['lastPrice'])) | ||
|
||
# get 1 minutes bars for Apple | ||
resp = od.history('AAPL', 'minutes', maxRecords=50, interval=1) | ||
|
||
# generic request by API name | ||
resp = od.get('getQuote', symbols='AAPL,EXC', fields='bid,ask') | ||
``` | ||
|
||
### Version | ||
|
||
- 1.0 - 7/27/2017 -- init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .ondemand_client import OnDemandClient, OnDemandError | ||
|
||
VERSION = '1.0.0' |
Oops, something went wrong.