![build](https://github.com/shubhamraj2202/stock-computing-service/actions/workflows/ci-tests.yml/badge.svg)
[![codecov](https://codecov.io/gh/shubhamraj2202/stock-computing-service/branch/main/graph/badge.svg?token=ciJFM9MV99)](https://codecov.io/gh/shubhamraj2202/stock-computing-service)
# Summary
1. This project to Extract/Transform/Load Data from free API provider named [AlphaVantage](https://www.alphavantage.co/documentation/) 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`
- 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:
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
Raw data
{
"_id": null,
"home_page": "",
"name": "stock-computing-service",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "stock,fastapi,ETL",
"author": "Shubham Raj",
"author_email": "shubhamraj2202@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5f/db/497db2063d84335f56e39d6f5533843ecd06f7e8e894464eef446a502c40/stock_computing_service-1.2.1a5.tar.gz",
"platform": null,
"description": "![build](https://github.com/shubhamraj2202/stock-computing-service/actions/workflows/ci-tests.yml/badge.svg)\n[![codecov](https://codecov.io/gh/shubhamraj2202/stock-computing-service/branch/main/graph/badge.svg?token=ciJFM9MV99)](https://codecov.io/gh/shubhamraj2202/stock-computing-service)\n# Summary\n1. This project to Extract/Transform/Load Data from free API provider named [AlphaVantage](https://www.alphavantage.co/documentation/) in to a Database\n2. Provides API service to sync the data, also retrieve from database and get statisttics \n\n# Tech Stack\n- Python for backend\n- FastAPI for runnning api services\n- Postgres Database\n- Docker to set up image for deployment and local development\n- GCP Kubernatess for provisioning of deployments/service\n\n# Setup project for development:\n`source setup.sh`\n\n# Run using command line:\n`uvicorn financial.main:app --host 0.0.0.0 --port 8000`\n- Go to Browser: http://0.0.0.0:8000/docs to test the APIs\n\n# Build Docker Image\n`docker image build -t stock-computing-service .`\n`docker buildx build --platform linux/amd64 -f ./Dockerfile -t image .`\n\n# Run via Docker using any of the below options:\n1. `docker run stock-computing-service`\n2. `docker-compose up`\n\n# Upload to docker hub\n`docker tag stock-computing-service-app shubhamraj2202/stock-computing-service-app:latest` \n`docker push shubhamraj2202/stock-computing-service-app:latest`\n\n# Delete from docker\n`docker rmi shubhamraj2202/stock-computing-service-app:latest`\n\n# DockerHub\nhttps://hub.docker.com/repository/docker/shubhamraj2202/stock-computing-service-app\n\n# PyPi\nhttps://pypi.org/project/stock-computing-service/\n\n# Maintaining API key\nFor local development, the API key can be accessed via environment variable `FINANCIAL_KEY`\n- Run `export FINANCIAL_KEY=\"YourAPIKEY\"` on shell. \n\nFor production environment, the API key should be stored in a secret management service like Vault, GCP Secret Manager /AWS\n\n\n# TODO Provision: Script to take initial setup of env\nInstall Google Cloud CLI https://cloud.google.com/sdk/docs/install\ngcloud init\ngcloud auth login\ngcloud auth application-default login\ngcloud components install gke-gcloud-auth-plugin\nexport GOOGLE_PROJECT=stock-computing-service\npulumi new gcp-python\npulumi config set gcp:project stock-computing-service\npulumi config set gcp:region us-west1\ngcloud container clusters get-credentials gke-cluster-f0853e1 --zone us-west1-a\ncd infra\npulumi stack init dev\n## Reference: https://github.com/pulumi/examples/blob/master/gcp-py-gke/README.md\n\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "stock_computing_service",
"version": "1.2.1a5",
"split_keywords": [
"stock",
"fastapi",
"etl"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "824fbf67a4e06483a2b9060856f2588525e05d7447836aadae9d19cad6955482",
"md5": "df3980dff500d62bb079ef27766987f1",
"sha256": "12043429dca7a95cc697527d6cfa173ac7fff3008b4a59bc12b59e6a3885276e"
},
"downloads": -1,
"filename": "stock_computing_service-1.2.1a5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "df3980dff500d62bb079ef27766987f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 11361,
"upload_time": "2023-04-03T05:53:16",
"upload_time_iso_8601": "2023-04-03T05:53:16.231327Z",
"url": "https://files.pythonhosted.org/packages/82/4f/bf67a4e06483a2b9060856f2588525e05d7447836aadae9d19cad6955482/stock_computing_service-1.2.1a5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5fdb497db2063d84335f56e39d6f5533843ecd06f7e8e894464eef446a502c40",
"md5": "96c210262e2c22b5c85c288652038982",
"sha256": "fc6139806b6425432f4e0ac162df891b1db9c499955a5dea9e3d0a3462fafe55"
},
"downloads": -1,
"filename": "stock_computing_service-1.2.1a5.tar.gz",
"has_sig": false,
"md5_digest": "96c210262e2c22b5c85c288652038982",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 8771,
"upload_time": "2023-04-03T05:53:17",
"upload_time_iso_8601": "2023-04-03T05:53:17.963129Z",
"url": "https://files.pythonhosted.org/packages/5f/db/497db2063d84335f56e39d6f5533843ecd06f7e8e894464eef446a502c40/stock_computing_service-1.2.1a5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-03 05:53:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "stock-computing-service"
}