{"id":49298509,"url":"https://github.com/weni-ai/weni-engine","last_synced_at":"2026-04-26T05:05:15.399Z","repository":{"id":37072349,"uuid":"318202433","full_name":"weni-ai/weni-engine","owner":"weni-ai","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-10T21:45:02.000Z","size":4689,"stargazers_count":9,"open_issues_count":20,"forks_count":6,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-04-10T22:04:46.584Z","etag":null,"topics":["django","django-rest-framework","grpc","grpc-python","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weni-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-03T13:28:21.000Z","updated_at":"2026-04-10T21:44:47.000Z","dependencies_parsed_at":"2023-12-18T17:58:17.397Z","dependency_job_id":"3da511e7-ddef-4478-9761-5ccce69b6e12","html_url":"https://github.com/weni-ai/weni-engine","commit_stats":null,"previous_names":[],"tags_count":788,"template":false,"template_full_name":null,"purl":"pkg:github/weni-ai/weni-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weni-ai%2Fweni-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weni-ai%2Fweni-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weni-ai%2Fweni-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weni-ai%2Fweni-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weni-ai","download_url":"https://codeload.github.com/weni-ai/weni-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weni-ai%2Fweni-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32286273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"online","status_checked_at":"2026-04-26T02:00:05.962Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","grpc","grpc-python","python","python3"],"created_at":"2026-04-26T05:05:14.724Z","updated_at":"2026-04-26T05:05:15.391Z","avatar_url":"https://github.com/weni-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weni\n\n[![Build Status](https://github.com/ilhasoft/weni-engine/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Ilhasoft/weni-engine/actions/workflows/ci.yml?query=branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/Ilhasoft/weni-engine/badge.svg?branch=main)](https://coveralls.io/github/Ilhasoft/weni-engine?branch=main)\n[![Python Version](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/)\n[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\n\n## Index\n\n[Running locally](#running)\n\n[Environment Variables List](#environment-variables-list)\n\n[License](#license)\n\n[Contributing](#contributing)\n\n## Running\n\n```sh\ngit clone https://github.com/weni-ai/weni-engine.git\n```\n\n### Keycloak\n\n[Docs](https://www.keycloak.org/guides#getting-started) | [Docker](https://hub.docker.com/r/jboss/keycloak/)\n\n```sh\ndocker run -p 8080:8080 -e KEYCLOAK_USER=\u003cUSERNAME\u003e -e KEYCLOAK_PASSWORD=\u003cPASSWORD\u003e jboss/keycloak\n```\n\nKeycloak will be running on `http://localhost:8080`\n\n#### Setting up the clients\n\n1. [Create a new realm](https://www.keycloak.org/getting-started/getting-started-docker#_create_a_realm), not recommended to use master realm\n\n2. Setup the clients \n\nEach service uses a client\n\n- Backend:\n    1. Create a client for the back-end\n    2. Set your access type to `confidential`\n    3. Standard Flow Enabled: On\n    4. Service Account Enabled: On\n    5. Service Account Roles --\u003e Client Roles --\u003e realm-management (user related roles)\n- Frontend:\n    1. Create a client for the front-end\n    2. Access Type: public\n    3. Standard Flow Enabled: on\n    4. Direct Access Grants Enabled: On\n\n### Environment Variables\n\n`OIDC_RP_CLIENT_ID` and `OIDC_RP_CLIENT_SECRET` refers to backend client credentials \n\n`\u003cKEYCLOAK-SERVER-URL\u003e` could be `https://\u003cyour-keycloak-host\u003e/` or `https://your-keycloak-host/auth/` depending on the keycloak version\n\nYou can get the `OIDC_RP_*` variables at: `https://your-keycloak-host/realms/\u003crealm-name\u003e/.well-known/openid-configuration`\n\u003e Ex for keycloak 16.1: `http://127.0.0.1:8080/auth/realms/engine_realm/.well-known/openid-configuration`\n\nengine_realm as realm name\n\n### Required environment variables\n\n```\nSECRET_KEY=\u003cSECRET_KEY\u003e\nOIDC_RP_REALM_NAME=\u003cKEYCLOAK-REALM-NAME\u003e\nOIDC_RP_CLIENT_ID=\u003cKEYCLOAK-CLIENT-ID\u003e\nOIDC_RP_CLIENT_SECRET=\u003cKEYCLOAK-CLIENT-SECRET\u003e\nOIDC_OP_LOGOUT_ENDPOINT=\u003cKEYCLOAK-SERVER-URL\u003e/realms/\u003cKEYCLOAK-REALM-NAME\u003e/protocol/openid-connect/logout\nOIDC_OP_TOKEN_ENDPOINT=\u003cKEYCLOAK-SERVER-URL\u003e/auth/realms/\u003cKEYCLOAK-REALM-NAME\u003e/protocol/openid-connect/token\nOIDC_RP_SCOPES=email profile openid offline_access\nOIDC_OP_AUTHORIZATION_ENDPOINT=\u003cKEYCLOAK-SERVER-URL\u003e/realms/\u003cKEYCLOAK-REALM-NAME\u003e/protocol/openid-connect/auth\nOIDC_RP_SIGN_ALGO= Sets the algorithm the IdP uses to sign ID tokens.\nOIDC_RP_SERVER_URL=\u003cKEYCLOAK-SERVER-URL\u003e\nOIDC_OP_USER_ENDPOINT=\u003cKEYCLOAK-SERVER-URL\u003e/auth/realms/\u003cKEYCLOAK-REALM-NAME\u003e/protocol/openid-connect/userinfo\nOIDC_OP_JWKS_ENDPOINT=\u003cKEYCLOAK-SERVER-URL\u003e/auth/realms/\u003cKEYCLOAK-REALM-NAME\u003e/protocol/openid-connect/certs\n```\n\n## Environment Variables List\n\nYou can set environment variables in your OS, write on ```.env``` file or pass via Docker config.\n\n| Variable | Type | Default | Description |\n|--|--|--|--|\n| SECRET_KEY | ```string```|  ```None``` | A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value.\n| DEBUG | ```boolean``` | ```False``` | A boolean that turns on/off debug mode.\n| BASE_URL | ```string``` | ```https://api.weni.ai``` | URL Base Weni Engine Backend.\n| WEBAPP_BASE_URL | ```string``` | ```https://dash.weni.ai``` | URL Base Weni Webapp.\n| ALLOWED_HOSTS | ```string``` | ```*``` | A list of strings representing the host/domain names that this Django site can serve.\n| DEFAULT_DATABASE | ```string``` | ```sqlite:///db.sqlite3``` | Read [django-environ](https://django-environ.readthedocs.io/en/latest/) to configure the database connection.\n| LANGUAGE_CODE | ```string``` | ```en-us``` | A string representing the language code for this installation.This should be in standard [language ID format](https://docs.djangoproject.com/en/2.0/topics/i18n/#term-language-code).\n| TIME_ZONE | ```string``` | ```UTC``` | A string representing the time zone for this installation. See the [list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n| STATIC_URL | ```string``` | ```/static/``` | URL to use when referring to static files located in ```STATIC_ROOT```.\n| CSRF_COOKIE_DOMAIN | ```string``` | ```None``` | The domain to be used when setting the CSRF cookie.\n| CSRF_COOKIE_SECURE | ```boolean``` | ```False``` | Whether to use a secure cookie for the CSRF cookie.\n| OIDC_RP_SERVER_URL | ```string``` | ```None``` | Open ID Connect Server URL, example: https://accounts.weni.ai/auth/.\n| OIDC_RP_REALM_NAME | ```string``` | ```None``` | Open ID Connect Realm Name.\n| OIDC_RP_CLIENT_ID | ```string``` | ```None``` | OpenID Connect client ID provided by your OP.\n| OIDC_RP_CLIENT_SECRET | ```string``` | ```None``` | OpenID Connect client secret provided by your OP.\n| OIDC_OP_AUTHORIZATION_ENDPOINT | ```string``` | ```None``` | URL of your OpenID Connect provider authorization endpoint.\n| OIDC_OP_TOKEN_ENDPOINT | ```string``` | ```None``` | URL of your OpenID Connect provider token endpoint.\n| OIDC_OP_USER_ENDPOINT | ```string``` | ```None``` | URL of your OpenID Connect provider userinfo endpoint.\n| OIDC_OP_JWKS_ENDPOINT | ```string``` | ```None``` | URL of your OpenID Connect provider JWKS endpoint.\n| OIDC_RP_SIGN_ALGO | ```string``` | ```RS256``` | Sets the algorithm the IdP uses to sign ID tokens.\n| OIDC_DRF_AUTH_BACKEND | ```string``` | ```weni.oidc_authentication.WeniOIDCAuthenticationBackend``` | Define the authentication middleware for the django rest framework.\n| AWS_ACCESS_KEY_ID | ```string``` | ```None``` | Specify Access Key ID S3.\n| AWS_SECRET_ACCESS_KEY | ```string``` | ```None``` | Specify Secret Access Key ID S3.\n| AWS_STORAGE_BUCKET_NAME | ```string``` | ```None``` | Specify Bucket Name S3.\n| AWS_S3_REGION_NAME | ```string``` | ```None``` | Specify the Bucket S3 region.\n| EMAIL_HOST | ```string``` | ```None``` | The host to use for sending email. When setted to ```None``` or empty string, the ```EMAIL_BACKEND``` setting is setted to ```django.core.mail.backends.console.EmailBackend```\n| EMAIL_PORT | ```int``` | ```25``` | Port to use for the SMTP server defined in ```EMAIL_HOST```.\n| DEFAULT_FROM_EMAIL | ```string``` | ```webmaster@localhost``` | Default email address to use for various automated correspondence from the site manager(s).\n| SERVER_EMAIL | ```string``` | ```root@localhost``` | The email address that error messages come from, such as those sent to ```ADMINS``` and ```MANAGERS```.\n| EMAIL_HOST_USER | ```string``` | ```''``` | Username to use for the SMTP server defined in ```EMAIL_HOST```.\n| EMAIL_HOST_PASSWORD | ```string``` | ```''``` | Password to use for the SMTP server defined in ```EMAIL_HOST```.\n| EMAIL_USE_SSL | ```boolean``` | ```False``` | Whether to use an implicit TLS (secure) connection when talking to the SMTP server.\n| EMAIL_USE_TLS | ```boolean``` | ```False``` | Whether to use a TLS (secure) connection when talking to the SMTP server.\n| SEND_EMAILS | ```boolean``` | ```True``` | Send emails flag.\n| INTELIGENCE_URL | ```string``` | ```https://bothub.it/``` | Specify the URL of the intelligence service.\n| FLOWS_URL | ```string``` | ```https://new.push.al/``` | Specify the URL of the flows service.\n| INTEGRATIONS_URL | ```string``` | ```None``` | Specify the URL of the integration service.\n| USE_SENTRY |  ```bool``` | ```False``` | Enable Support Sentry\n| SENTRY_URL |  ```string``` | ```None``` | URL Sentry\n| APM_DISABLE_SEND |  ```bool``` | ```False``` | Disable sending Elastic APM\n| APM_SERVICE_DEBUG |  ```bool``` | ```False``` | Enable APM debug mode\n| APM_SERVICE_NAME |  ```string``` | ```''``` | APM Service Name\n| APM_SECRET_TOKEN |  ```string``` | ```''``` | APM Secret Token\n| APM_SERVER_URL |  ```string``` | ```''``` | APM URL\n| FLOW_GRPC_ENDPOINT |  ```string``` | ```'localhost:8002'``` | gRPC Endpoint URL\n| INTELIGENCE_GRPC_ENDPOINT |  ```string``` | ```'localhost:8003'``` | gRPC Endpoint URL\n| INTEGRATIONS_GRPC_ENDPOINT |  ```string``` | ```'localhost:8004'``` | gRPC Endpoint URL\n| SYNC_ORGANIZATION_INTELIGENCE |  ```bool``` | ```False``` | Enable or Disable sync organization inteligences service\n| INTELIGENCE_CERTIFICATE_GRPC_CRT |  ```string``` | ```None``` | Absolute certificate path for secure grpc communication\n| FLOW_CERTIFICATE_GRPC_CRT |  ```string``` | ```None``` | Absolute certificate path for secure grpc communication\n| INTEGRATIONS_CERTIFICATE_GRPC_CRT |  ```string``` | ```None``` | Absolute certificate path for secure grpc communication\n| SEND_REQUEST_FLOW |  ```boolean``` | ```False``` | Enables or disables sending user information to flows\n| FLOW_MARKETING_UUID |  ```string``` | ```None``` | UUID Flow\n| TOKEN_AUTHORIZATION_FLOW_MARKETING |  ```string``` | ```None``` | Token Authorization API Flow\n| BILLING_TEST_MODE |  ```boolean``` | ```False``` | Configure Test mode Billing\n| BILLING_SETTINGS |  ```json``` | ```{}``` | Set configuration for gateways payment billing\n| BILLING_COST_PER_WHATSAPP |  ```float``` | ```None``` | Set cost for extra whatsapp\n| TOKEN_EXTERNAL_AUTHENTICATION |  ```string``` | ```None``` | Token External Authorization API\n| ENVIRONMENT |  ```string``` | ```production``` | Specify the environment you are going to run, it is also used for sentry\n\n\n## License\n\nDistributed under the MPL-2.0 License. See `LICENSE` for more information.\n\n## Running\n\n[Install docker](https://docs.docker.com/get-docker/)\n\nCreate an .env file in the project root and add the above environment variables\n\nFor authentication, we use Keycloak, you need to run it locally:\n  - [Documentation](https://www.keycloak.org/documentation.html)\n\nExecute `docker-compose build` to build application\n\nExecute `docker-compose up` to up the server\n\nVery good, your application is running :rocket:                                   \n\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nTo see more go to the [Weni Platform central repository](https://github.com/Ilhasoft/weni-platform).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweni-ai%2Fweni-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweni-ai%2Fweni-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweni-ai%2Fweni-engine/lists"}