Last active
November 9, 2019 16:01
-
-
Save viggy28/908303a939b766b6105f1581e5ac5cd8 to your computer and use it in GitHub Desktop.
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
* pip install git+https://github.com/manahl/arctic.git | |
error in arctic setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in futures; python_version == '2.7' at ; python_version == '2.7' | |
(reference: https://github.com/sdispater/pendulum/issues/187) | |
* pip install --upgrade setuptools --user | |
* pip install git+https://github.com/manahl/arctic.git --user | |
-- install mongodb | |
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ | |
viggy28$ brew tap mongodb/brew | |
viggy28$ brew install mongodb-community@4.2 | |
I prefer to have data directory other than default. | |
You can update in mongodb.conf | |
-- dateutil issue | |
pip install python-dateutil==2.5.0 --user | |
https://stackoverflow.com/questions/51470373/dateutil-2-5-0-is-the-minimum-required-version | |
-- install quandl | |
pip install quandl --user | |
-- https://www.quandl.com/tools/api (register and get your token. Also verify your email) | |
-- Installing on EC2. | |
1. Spin up an instance with RHEL | |
2. ssh -i ".pem" ec2-user@*.compute.amazonaws.com | |
3. https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ | |
4. sudo dnf install git | |
5. sudo yum search python3 | more | |
5a. sudo yum install python3 | |
6. install arctic | |
6a. sudo ../python3 setup.py install | |
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
from arctic import Arctic | |
import quandl | |
# Connect to Local MONGODB | |
store = Arctic('localhost') | |
# Create the library - defaults to VersionStore | |
store.initialize_library('NASDAQ') | |
# Access the library | |
library = store['NASDAQ'] | |
# Load some data - maybe from Quandl | |
aapl = quandl.get("WIKI/AAPL", authtoken="<replace-yout-token-here>") | |
# Store the data in the library | |
library.write('AAPL', aapl, metadata={'source': 'Quandl'}) | |
# Reading the data | |
item = library.read('AAPL') | |
aapl = item.data | |
metadata = item.metadata | |
print "aapl" | |
print aapl | |
print "metadata" | |
print metadata | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If everything works fine, you should see aapl ticker data.