Skip to main content

stock_computing_service

Project description

build codecov

Summary

  1. This project to Extract/Transform/Load Data from free API provider named AlphaVantage in to a Database
  2. 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

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:

  1. docker run stock-computing-service
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stock_computing_service-1.2.1a5.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file stock_computing_service-1.2.1a5.tar.gz.

File metadata

File hashes

Hashes for stock_computing_service-1.2.1a5.tar.gz
Algorithm Hash digest
SHA256 fc6139806b6425432f4e0ac162df891b1db9c499955a5dea9e3d0a3462fafe55
MD5 96c210262e2c22b5c85c288652038982
BLAKE2b-256 5fdb497db2063d84335f56e39d6f5533843ecd06f7e8e894464eef446a502c40

See more details on using hashes here.

File details

Details for the file stock_computing_service-1.2.1a5-py3-none-any.whl.

File metadata

File hashes

Hashes for stock_computing_service-1.2.1a5-py3-none-any.whl
Algorithm Hash digest
SHA256 12043429dca7a95cc697527d6cfa173ac7fff3008b4a59bc12b59e6a3885276e
MD5 df3980dff500d62bb079ef27766987f1
BLAKE2b-256 824fbf67a4e06483a2b9060856f2588525e05d7447836aadae9d19cad6955482

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page