Skip to content

backend for the lucrozero app (lucrozero.app.br/lucrozero.com.br)

License

Notifications You must be signed in to change notification settings

raulc27/zerosum

Repository files navigation

ZeroSum

Just a simple python api for stock basic requests

endpoints:

/genai/resume_market

/genai/resume_ticker/:TICKER.sa

/brapi/sync_quote_list

/brapi/async_quote/:TICKER.sa

/brapi/sync_quote/:TICKER.sa

Execute it with docker:

docker pull raulc27/zerosum

https://hub.docker.com/r/raulc27/zerosum

Environment Variables

To run this project, you will need to add the following environment variables to your .env file or deployment environment:

Variable Description Required Default
GENAI_API_KEY API key for Google Generative AI features Yes -
BRAPI_TOKEN Token for accessing Brapi.dev API Yes -
CLIENT_API_KEY Secret key to authenticate clients accessing this API Yes -
CORS_ORIGIN Allowed origin for CORS No *
FLASK_ENV Environment mode (production enables Redis) No development
REDIS_HOST Redis Hostname (Required if Prod) No -
REDIS_PORT Redis Port (Required if Prod) No -
REDIS_USER Redis Username (Optional) No -
REDIS_PASSWORD Redis Password (Required if Prod) No -

Caching

This application uses Redis for caching in production environments (FLASK_ENV=production). In development mode (default), caching is disabled (NullCache) to facilitate debugging.

Setting up variables

You can create a .env file in the root directory:

GENAI_API_KEY=your_genai_key
BRAPI_TOKEN=your_brapi_token
CLIENT_API_KEY=your_client_secret_key
CORS_ORIGIN=http://localhost:3000

# Redis (Production only)
FLASK_ENV=production
REDIS_HOST=mx.redis-server.com
REDIS_HOST=mx.redis-server.com
REDIS_PORT=6379
REDIS_USER=default
REDIS_PASSWORD=secret

Or export them in your terminal:

export GENAI_API_KEY=your_genai_key
export BRAPI_TOKEN=your_brapi_token
export CLIENT_API_KEY=your_client_secret_key

About

backend for the lucrozero app (lucrozero.app.br/lucrozero.com.br)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published