stock_computing_service
Project description
Summary
- This project to Extract/Transform/Load Data from free API provider named AlphaVantage in to a Database
- Provides API service to sync the data, also retrieve from database and get statisttics
Tech Stack
- Python for backend
- FastAPI for runnning api services
- Postgres Database
- Docker to set up image for deployment and local development
- GCP Kubernatess for provisioning of deployments/service
Setup project for development:
source setup.sh
Run using command line:
uvicorn financial.main:app --host 0.0.0.0 --port 8000
- Go to Browser: http://0.0.0.0:8000/docs to test the APIs
Build Docker Image
docker image build -t stock-computing-service .
docker buildx build --platform linux/amd64 -f ./Dockerfile -t image .
Run via Docker using any of the below options:
docker run stock-computing-service
docker-compose up
Upload to docker hub
docker tag stock-computing-service-app shubhamraj2202/stock-computing-service-app:latest
docker push shubhamraj2202/stock-computing-service-app:latest
Delete from docker
docker rmi shubhamraj2202/stock-computing-service-app:latest
DockerHub
https://hub.docker.com/repository/docker/shubhamraj2202/stock-computing-service-app
PyPi
https://pypi.org/project/stock-computing-service/
Maintaining API key
For local development, the API key can be accessed via environment variable FINANCIAL_KEY
- Run
export FINANCIAL_KEY="YourAPIKEY"
on shell.
For production environment, the API key should be stored in a secret management service like Vault, GCP Secret Manager /AWS
TODO Provision: Script to take initial setup of env
Install Google Cloud CLI https://cloud.google.com/sdk/docs/install gcloud init gcloud auth login gcloud auth application-default login gcloud components install gke-gcloud-auth-plugin export GOOGLE_PROJECT=stock-computing-service pulumi new gcp-python pulumi config set gcp:project stock-computing-service pulumi config set gcp:region us-west1 gcloud container clusters get-credentials gke-cluster-f0853e1 --zone us-west1-a cd infra pulumi stack init dev
Reference: https://github.com/pulumi/examples/blob/master/gcp-py-gke/README.md
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
File details
Details for the file stock_computing_service-1.2.1a5.tar.gz
.
File metadata
- Download URL: stock_computing_service-1.2.1a5.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc6139806b6425432f4e0ac162df891b1db9c499955a5dea9e3d0a3462fafe55 |
|
MD5 | 96c210262e2c22b5c85c288652038982 |
|
BLAKE2b-256 | 5fdb497db2063d84335f56e39d6f5533843ecd06f7e8e894464eef446a502c40 |
File details
Details for the file stock_computing_service-1.2.1a5-py3-none-any.whl
.
File metadata
- Download URL: stock_computing_service-1.2.1a5-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12043429dca7a95cc697527d6cfa173ac7fff3008b4a59bc12b59e6a3885276e |
|
MD5 | df3980dff500d62bb079ef27766987f1 |
|
BLAKE2b-256 | 824fbf67a4e06483a2b9060856f2588525e05d7447836aadae9d19cad6955482 |