{"id":21496472,"url":"https://github.com/mlibrary/python-starter","last_synced_at":"2026-01-03T12:52:38.894Z","repository":{"id":220398919,"uuid":"751511231","full_name":"mlibrary/python-starter","owner":"mlibrary","description":"Boilerplate code for developing a python app in docker","archived":false,"fork":false,"pushed_at":"2024-11-21T19:10:30.000Z","size":57,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-01-23T21:53:08.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlibrary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-02-01T18:50:45.000Z","updated_at":"2024-11-21T19:13:49.000Z","dependencies_parsed_at":"2024-02-01T21:56:28.480Z","dependency_job_id":"24cfd7e6-5b14-4507-86de-cbe0dd62dca3","html_url":"https://github.com/mlibrary/python-starter","commit_stats":null,"previous_names":["mlibrary/python-starter"],"tags_count":0,"template":true,"template_full_name":"mlibrary/ruby-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fpython-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fpython-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fpython-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fpython-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlibrary","download_url":"https://codeload.github.com/mlibrary/python-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031154,"owners_count":20386534,"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":"2024-11-23T16:16:31.572Z","updated_at":"2026-01-03T12:52:38.834Z","avatar_url":"https://github.com/mlibrary.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-docker-boilerplate\n\nBoilerplate code for starting a python project with docker and docker-compose\n\n## How to set up your python environment\n\n### Install python\n\nOn mac,\n\n* You can read this blog to install python in a right way in\n      python: https://opensource.com/article/19/5/python-3-default-mac\n      \n* **Recommendation**: Install python using brew and pyenv\n\n### Managing python dependencies\n\n* **Install poetry**\n\n* On Mac OS, Windows and Linux,\n  * Install poetry:\n       * ``curl -sSL https://install.python-poetry.org | python3 -``\n         * This way allows poetry and its dependencies to be isolated from your dependencies. I don't recommend to use \n         * pip to install poetry because poetry and your application dependencies will be installed in the same environment.\n       * ```poetry init```: \n         * Use this command to set up your local environment, repository details, and dependencies. \n         * It will generate a pyproject.toml file with the information you provide.\n           * Package name [python-starter]:\n           * Version [0.1.0]:\n           * Description []:\n           * Author []:  n \n           * License []:\n           * Compatible Python versions [^3.11]: \n           * Would you like to define your main dependencies interactively? (yes/no) [yes]: no\n           * Would you like to define your development dependencies interactively? (yes/no) no\n       * ```poetry install```: \n         * Use this command to automatically install the dependencies specified in the pyproject.toml file.\n         * It will generate a poetry.lock file with the dependencies and their versions.\n         * It will create a virtual environment in the home directory, e.g. /Users/user_name/Library/Caches/pypoetry/..\n       * ```poetry env use python```: \n         * Use this command to find the virtual environment directory, created by poetry.\n       * ```source ~/Library/Caches/pypoetry/virtualenvs/python-starter-0xoBsgdA-py3.11/bin/activate```\n         * Use this command to activate the virtual environment.\n       * ```poetry shell```: \n         * Use this command to activate the virtual environment.\n       * ```poetry add pytest```: \n         * Use this command to add dependencies.\n       * ```poetry add --dev pytest```:\n         * Use this command to add development dependencies.\n       * `` poetry update ``: \n         * Use this command if you change your .toml file and want to generate a new version the .lock file\n\n## Set up in a docker environment\n\n```\n./init.sh\n```\n\nThis will:\n\n* copy the project folder\n* build the docker image\n* install the dependencies\n* create a container with the application\n\n## How to run the application\n\n``docker compose exec app python --version``\n\n\n## Tests\n\n## Background\nThis repository goes with this documentation:\nhttps://mlit.atlassian.net/wiki/spaces/LD/pages/10092544004/Python+in+LIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fpython-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlibrary%2Fpython-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fpython-starter/lists"}