Wrapper for financial database APIs
Project description
HongXiongMao Refuel
Toolbox for importing data from various financial sources; for a personal project so if you are here by accident I highly advise you look elsewhere.
Installation
Bloomberg API
To make Bloomberg calls, the blpapi
package must be installed; we then extend the excellent xbbg
package.
Unfortunately, installing of blpapi
can be a pain in the backside.
I can't get pyproject.toml
to correctly install blpapi
as a dependency.
Using pip instruction from the Bloomberg website
python -m pip install --index-url=https://bcms.bloomberg.com/pip/simple blpapi
Poetry requires 2 steps
- Set up Bloomberg as a source,
- installing
blpapi
poetry source add --priority=supplemental bloomberg https://bcms.bloomberg.com/pip/simple/
poetry add --source bloomberg blpapi
Snowflake SQL
In order to get snowflake connectors working we've had to install several additional packages. Snowflake is very picky about which versions of pyarrow etc... are installed and requires old versions.
snowflake-connector-python = "^3.2.0"
snowflake-sqlalchemy = "^1.5.0"
pyarrow = ">=10.0.1, <10.1.0"
cryptography = "^41.0.5"
Publishing to PyPi
I'm no pro at deploying packages to PyPi, so these are my notes for deployment of a poetry package. For reference, I followed this tutorial
Key points:
- (PyPi account is required)[https://pypi.org/manage/account/#account-emails]
- (Configure Poetry)[https://python-poetry.org/docs/repositories/#configuring-credentials]
- poetry build
- poetry publish
# configure API key
poetry config pypi-token.pypi <pypi-reallyREALLYllongKEY...>
# The build bit
(base) (hxm-refuel-py3.10) PS C:\Users\XXX\Documents\GitHub\hxm-refuel> poetry build
Building hxm-refuel (0.1.0)
- Building sdist
- Built hxm_refuel-0.1.0.tar.gz
- Building wheel
- Built hxm_refuel-0.1.0-py3-none-any.whl
# publishing bit
(base) (hxm-refuel-py3.10) PS C:\Users\T333208\Documents\GitHub\hxm-refuel> poetry publish
Publishing hxm-refuel (0.1.0) to PyPI
- Uploading hxm_refuel-0.1.0-py3-none-any.whl 0%
- Uploading hxm_refuel-0.1.0-py3-none-any.whl 85%
- Uploading hxm_refuel-0.1.0-py3-none-any.whl 100%
- Uploading hxm_refuel-0.1.0.tar.gz 0%
- Uploading hxm_refuel-0.1.0.tar.gz 100%
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hxm_refuel-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b26a0154055edb89374af8af075e146bf53c7a47187b6ec73449a0acd753248d |
|
MD5 | 10fa36585f2a5e976816a3260e1c4ff8 |
|
BLAKE2b-256 | 21257cbfab0b98ffdffb4cedec9a27209c45527b49db0c48ff655ff3e5084aa8 |