Hosting the database .json files locally
jstesta opened this issue · 3 comments
Describe the solution you'd like
The library always reaches out to the Internet to get the database .json files. This is not ideal for performance or for a program that might not have an Internet connection.
I'd like a way to host the database files on my own local machine or intranet, and specify my own base URL for the .json database files. Perhaps it could be an optional parameter called base_url
for the select_
series of methods in FinanceDatabase. I suppose the given base URL would just integrate and override the URLs you have hard-coded in json_picker.py.
Describe alternatives you've considered
Copying the files to my local machine and manually editing json_picker.py to use it.
This is a good suggestion and I will add this later this week.
Updated the package, please upgrade to version 0.1.10 and let me know if it doesn't work properly for you.
More context, check the section below (from README):
If you wish to store the database at a different location (for example your own Fork) you can do so with the variable
base_url
which you can find in each of the above 'select' functions. An example would be:
select_funds(category='Africa Equity', base_url=<YOUR URL>)
You can also store the database locally and point to your local location with the variable base_url
and by setting
use_local_location
to True. An example would be:
select_etfs(category='Bank Loan, base_url=C:/Users/jerbo/FinanceDatabase/Database/ETFs/, use_local_location=True)