{"id":24561539,"url":"https://github.com/codeworksfrance/codetestback","last_synced_at":"2025-07-15T11:42:19.080Z","repository":{"id":52609377,"uuid":"342521136","full_name":"CodeWorksFrance/CodeTestBack","owner":"CodeWorksFrance","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-23T14:52:45.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T22:26:43.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeWorksFrance.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-26T09:09:29.000Z","updated_at":"2021-04-23T14:52:49.000Z","dependencies_parsed_at":"2022-09-24T21:50:32.642Z","dependency_job_id":null,"html_url":"https://github.com/CodeWorksFrance/CodeTestBack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeWorksFrance/CodeTestBack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2FCodeTestBack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2FCodeTestBack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2FCodeTestBack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2FCodeTestBack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeWorksFrance","download_url":"https://codeload.github.com/CodeWorksFrance/CodeTestBack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2FCodeTestBack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265432947,"owners_count":23764193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-01-23T08:32:19.756Z","updated_at":"2025-07-15T11:42:19.028Z","avatar_url":"https://github.com/CodeWorksFrance.png","language":"Python","readme":"# CodeTestBack\n\n## GCP Configuration\n\n* **Project ID** : code-test-back\n\n\n* **Region** : europe-west1\n\n\n* **Zone** : europe-west1-b\n\n\n* **Cloud Run Service** : code-test-back-service\n\n\n* **Cloud Build** : code-test-back-trigger\n\n\n* **Enabled Services** :\n    * Enable Cloud Run API\n    * Enable Cloud Build\n    * Enable Container Register\n    * Enable Cloud SQL Admin API\n\n\n* **Authorization**:\n    * **CodeTestBack** -\u003e **IAM \u0026 Admin** -\u003e **Service Accounts** -\u003e **Copy the service account**\n    * **CodeTestBDD** -\u003e **IAM \u0026 Admin** -\u003e **IAM page** -\u003e **ADD** -\u003e **Past the service account and give the Cloud SQL\n      Client Role**\n\n## Running locally\n\nTo run this application locally, download and install the `cloud_sql_proxy` by following the\ninstructions [here](https://cloud.google.com/sql/docs/postgres/sql-proxy#install).\n\nInstructions are provided below for using the proxy with a TCP connection or a Unix Domain Socket. On Linux or Mac OS\nyou can use either option, but on Windows the proxy currently requires a TCP connection.\n\n### Launch proxy with TCP\n\nTo run the sample locally with a TCP connection, set environment variables and launch the proxy as shown below.\n\n#### Linux / Mac OS\n\nUse these terminal commands to initialize environment variables:\n\n* Init environment variables\n\n```bash\nchmod 775 init_db_vars.sh\nsource ./init_db_vars.sh\n```\n\nNote: Saving credentials in environment variables is convenient, but not secure - consider a more secure solution such\nas [Secret Manager](https://cloud.google.com/secret-manager/docs/overview) to help keep secrets safe.\n\n* Then use this command to launch the proxy in the background:\n\n```bash\n./cloud_sql_proxy -instances=codetestbdd:europe-west1:codetest-bdd-1=tcp:5432 \u0026\n```\n\n* To stop the proxy :\n\nFind process :\n\n```bash\nps | grep cloud_sql_proxy\n```\n\nKill process based on its id\n\n```bash\nkill process_id\n```\n\n### Configure your local Postgres Client using the Cloud SQL PROXY\n\n    Host : localhost\n    Port : 5432\n    User : Postgres\n    Pass : CodeWorks\n    Database : postgres\n\n### Install Pipenv Globally\n\n1. Open Terminal in (Applications/Utilities/Terminal) and upgrade pip:\n   ```bash\n   python3.8 -m pip install pip --upgrade\n   ```\n   Another option to upgrade, is:\n\n    ```bash\n   pip3 install pip --upgrade\n   ```\n\n2. Install Pipenv:\n   ```bash\n   python3.8 -m pip install pipenv\n   ```\n   Another option to upgade, is :\n\n   ```bash\n   pip3 install pipenv --upgrade\n   ```\n3. Verify Pipenv:\n    ```bash   \n    pipenv\n   ```\n\n### Testing the application\n\n```bash\nvirtualenv --python python3 env\n\nsource env/bin/activate\n\npip install -r requirements.txt\n`````\n\nFinally, start the application:\n\n```bash\nstrawberry server app\n```\n\nNavigate towards `http://127.0.0.1:8000` or `http://localhost:8000` to verify your application is running correctly.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Fcodetestback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeworksfrance%2Fcodetestback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Fcodetestback/lists"}