{"id":19986535,"url":"https://github.com/metrostar/comet-api","last_synced_at":"2025-05-04T07:31:29.327Z","repository":{"id":196522976,"uuid":"694804130","full_name":"MetroStar/comet-api","owner":"MetroStar","description":"Python Fast API for the Comet Starter App","archived":false,"fork":false,"pushed_at":"2025-04-02T14:01:30.000Z","size":1206,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-02T15:21:42.599Z","etag":null,"topics":["alembic","fastapi","pydantic","pytest","python","redoc","ruff","sqlalchemy","swagger"],"latest_commit_sha":null,"homepage":"https://metrostar.github.io/comet-api/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MetroStar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-09-21T18:17:14.000Z","updated_at":"2025-04-02T14:01:31.000Z","dependencies_parsed_at":"2023-09-26T04:05:02.961Z","dependency_job_id":"cee7f670-86da-4944-90ed-8bfa3f98a9d4","html_url":"https://github.com/MetroStar/comet-api","commit_stats":null,"previous_names":["metrostar/comet-api"],"tags_count":0,"template":true,"template_full_name":"MetroStar/opensource-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetroStar%2Fcomet-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetroStar%2Fcomet-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetroStar%2Fcomet-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetroStar%2Fcomet-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetroStar","download_url":"https://codeload.github.com/MetroStar/comet-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252304728,"owners_count":21726610,"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":["alembic","fastapi","pydantic","pytest","python","redoc","ruff","sqlalchemy","swagger"],"created_at":"2024-11-13T04:29:30.544Z","updated_at":"2025-05-04T07:31:29.321Z","avatar_url":"https://github.com/MetroStar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to the Comet API!\n\nThe goal of this project is to provide a Python-based starter API, which comes pre-configured with tools supporting the accelerated development of both Comet as well as general python APIs. Some of these tools are as follows:\n\n- Platform: Python\n- Web Framework: Fast API\n- Database: SQLite, Alembic\n- ORM: SQLAlchemy\n- Data Validation: Pydantic\n- Unit Testing: PyTest\n- Code Quality: Ruff, PyLint, Black, isort\n- Authentication support: JWT\n- Documentation: Swagger and ReDoc\n\n## Table of Contents\n\n1. [Running the Project Locally](#running-the-project-locally)\n2. [Running with Docker](#running-with-docker)\n3. [Running Unit Tests](#running-unit-tests)\n4. [Running Code Quality Checks](#running-code-quality-checks)\n5. [Running Code Formatting](#running-code-formatting)\n6. [Publishing Updated Docs](#publishing-updated-docs)\n7. [Contributing](#contributing)\n8. [Next Steps](#next-steps)\n\n## Running the Project Locally\n\n1. To create an environment, run the following:\n\n```sh\nvirtualenv -p python3 venv\nsource venv/bin/activate\n```\n\n2. To install project dependencies, run the following:\n\n```sh\npip install .\n```\n\n3. To install dev dependencies, run the following (optional):\n\n```sh\npip install -e \".[dev]\"\n```\n\n4. To prepare your environment, add a file called `.env` to the `comet-api` directory. Copy and paste the template below and replace the placeholder values with your own:\n\n```\nDATABASE_URL=[SOME_URL] # Ex: 'sqlite:///./db.sqlite3'\nOIDC_CONFIG_URL=[SOME_URL] # Ex: 'https://token.actions.githubusercontent.com/.well-known/openid-configuration'\n```\n\n5. To start the app, run the following:\n\n```sh\nuvicorn app.main:app --reload --host=0.0.0.0 --port=5000\n```\n\n6. Access the swagger docs by navigating to: `http://0.0.0.0:5000/docs`\n\n## Running with Docker\n\n1. To build the image, run the following:\n\n```sh\ndocker build . -t comet-api\n```\n\n2. To run the container, run the following:\n\n```sh\ndocker run -p 5000:5000 --name comet-api comet-api\n```\n\n3. Access the swagger docs by navigating to: `http://0.0.0.0:5000/docs`\n\n## Running Unit Tests\n\n1. To run unit tests, run the following:\n\n```sh\npytest\n```\n\n2. To run unit tests with code coverage, run the following:\n\n```sh\ncoverage run -m pytest \u0026\u0026 coverage html\n```\n\n## Running Code Quality Checks\n\n1. To run code quality checks, run the following:\n\n```sh\nruff check .\n```\n\n## Running Code Formatting\n\n1. To run code formatting, run the following:\n\n```sh\nruff format .\n```\n\n## Publishing Updated Docs\n\n1. Access the swagger ReDocs by navigating to: `http://0.0.0.0:5000/redoc`\n\n2. Download the OpenAPI spec, click the Download button\n\n3. Navigate to `https://editor.swagger.io/#/`\n\n4. Upload the spec, click File \u003e\u003e Import File and select the spec file previously downloaded\n\n5. Download the converted spec, click Generate Client \u003e\u003e openapi-yaml\n\n6. Copy the downloaded file into the `comet-api/docs` directory\n\n7. Convert the yaml into html run the following:\n\n```sh\nnpx redoc-cli bundle docs/openapi.yaml\n```\n\n8. Copy the generated html to the docs directory, run the following:\n\n```sh\nmv redoc-static.html docs/index.html\n```\n\n9. Commit the spec and html files and merge into `main` to publish docs\n\n## Contributing\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature_a`)\n3. Commit your Changes (`git commit -m 'Added new feature_a'`)\n4. Push to the Branch (`git push origin feature_a`)\n5. Open a Pull Request\n\n## Next Steps\n\nThe following provides a short list of tasks which are potential next steps for this project. These could be steps in making use of this baseline or they could be for learning purposes.\n\n- [ ] Add/Update existing endpoints with more applicable entities and/or columns\n- [ ] Update applicable endpoints to require JWT\n- [ ] Add Admin endpoints to support password reset\n- [ ] Replace default database with external database (Ex. Postgres)\n- [ ] Deploy to cloud infrastructure\n- [ ] Automate doc publishing process\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrostar%2Fcomet-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrostar%2Fcomet-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrostar%2Fcomet-api/lists"}