Skip to content

weni-ai/weni-integrations-engine

Repository files navigation

weni-marketplace-engine

Build Status codecov

This project provides so many API endpoints to manage Weni Platform marketplace.

Running project for development

Requirements

  • Python ^3.8
  • Poetry ^1.0

Installation

To run this project, we will need Poetry installed on your machine.
After installing poetry, install all dependencies using (on project root path):

$ poetry install

To enter on Poetry virtual environment, we use:

$ poetry shell

Environment setting

In this project we use environment variables to make most of the configurations. To speed up the project installation process we use a script to generate our .env file, it can be found in contrib/gen_env.py. To use type:

$ python contrib/gen_env.py

Ready, an .env file should be appars on root of project, and from it we can configure our environment variables.

OBS: The use of this script is recommended in development environment only.

Setting up the local database

To get the database up and running, docker-compose can be handy:

$ docker-compose up -d database

Run the necessary migrations with:

$ python manage.py migrate

Executing the application

To run the application, you can use:

$ python manage.py runserver 8001

Environment Variables list:

Name Type Required Default Description
DEBUG Bool False True If True, debug actions are made and shown in stdout.
SECRET_KEY String True None Django's required SECRET_KEY.
ALLOWED_HOSTS List False None Django's ALLOWED_HOSTS variable
DATABASE_URL String True None Postgres database URL.
LANGUAGE_CODE String False "en-us" Language code used in i18n.
TIME_ZONE String False "America/Maceio" Application time zone.
MEDIA_ROOT String False "media/" The default medias folder if S3 is not provided.
USE_S3 Bool False False Boolean that defines if S3 should be used.
AWS_ACCESS_KEY_ID String False None Amazon S3 bucket Access Key.
AWS_SECRET_ACCESS_KEY String False None Amazon S3 bucket Secret Key.
AWS_STORAGE_BUCKET_NAME String False None Amazon S3 bucket name.
USE_OIDC Bool False False Boolean that defines if OIDC should be used.
OIDC_RP_CLIENT_ID String False None OpenID Connect client ID provided by your OP.
OIDC_RP_CLIENT_SECRET String False None OpenID Connect client secret provided by your OP
OIDC_OP_AUTHORIZATION_ENDPOINT String False None URL of your OpenID Connect provider authorization endpoint.
OIDC_OP_TOKEN_ENDPOINT String False None URL of your OpenID Connect provider token endpoint
OIDC_OP_USER_ENDPOINT String False None URL of your OpenID Connect provider userinfo endpoint
OIDC_OP_JWKS_ENDPOINT String False None URL of the OIDC OP jwks endpoint
OIDC_RP_SIGN_ALGO String False HS256 Sets the algorithm the IdP uses to sign ID tokens.
OIDC_DRF_AUTH_BACKEND String False None Sets the default rest framework integration of OIDC with Django
OIDC_RP_SCOPES String False openid email The OpenID Connect scopes to request during login.
CORS_ALLOWED_ORIGINS List False [ ] Allowed Origins at CORS configuration.
CONNECT_GRPC_SERVER_URL String False None URL of gRPC Connect client.
CONNECT_CERTIFICATE_GRPC_CRT String False None Certificate of gRPC Connect client.
SOCKET_BASE_URL String False None Base URL of a Weni Web Chat Socket application
FLOWS_HOST_URL String False None Base URL of a Weni Flows application.
CELERY_BROKER_URL String False redis://localhost:6379 Default broker URL.
CELERY_RESULT_BACKEND String False redis://localhost:6379 The backend used to store task results
USE_SENTRY Bool False False Boolean that defines if Sentry should be initialized.
SENTRY_DSN String False None Sentry's DSN URL.
USE_GRPC Bool False False Boolean that defines if GRPC should be used.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages