{"id":14979068,"url":"https://github.com/creyd/creypy","last_synced_at":"2025-10-28T14:30:51.307Z","repository":{"id":230943682,"uuid":"780478112","full_name":"creyD/creyPY","owner":"creyD","description":"My collection of Python and FastAPI shortcuts etc.","archived":false,"fork":false,"pushed_at":"2024-07-14T16:25:34.000Z","size":38,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T18:41:55.588Z","etag":null,"topics":["fastapi","python","shortcuts"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/creyPY/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creyD.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}},"created_at":"2024-04-01T15:10:37.000Z","updated_at":"2024-07-14T16:24:16.000Z","dependencies_parsed_at":"2024-09-19T01:07:33.966Z","dependency_job_id":"2f67178e-26f3-4885-9639-28588c73eb62","html_url":"https://github.com/creyD/creyPY","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.045454545454545414","last_synced_commit":"be7d7ddb2294203f0d3970b2838dce9dba3f74a8"},"previous_names":["creyd/creypy"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creyD%2FcreyPY","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creyD%2FcreyPY/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creyD%2FcreyPY/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creyD%2FcreyPY/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creyD","download_url":"https://codeload.github.com/creyD/creyPY/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859520,"owners_count":16556036,"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":["fastapi","python","shortcuts"],"created_at":"2024-09-24T13:59:10.673Z","updated_at":"2025-10-28T14:30:46.005Z","avatar_url":"https://github.com/creyD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# creyPY\n\nMy collection of Python and FastAPI shortcuts etc.\n\n## Installation\n\n```bash\npip install creyPY -U\n```\n\n## Versioning\n\nThis library uses [Semantic Versioning](https://semver.org/).\n\n## FastAPI\n\nThis library installes fastapi and pydantic, as well as sqlalchemy for you. It also provides a sqlalchemy base class and companion pydantic schemas. Also there are some helper functions for FastAPI in `creyPY.fastapi.app` like `generate_unique_id` to generate unique operation IDs for the OpenAPI schema to work with code generators.\n\n### Database connection\n\nThe `creyPY.fastapi.db` module provides a `Session` class that can be used as a context manager to connect to a database. It exposes the `SQLALCHEMY_DATABASE_URL` variable for you to use. It uses the following environment variables:\n\n- `POSTGRES_HOST`: The host of the database\n- `POSTGRES_PORT`: The port of the database\n- `POSTGRES_USER`: The user of the database\n- `POSTGRES_PASSWORD`: The password of the database\n- `POSTGRES_DB`: The database name\n\nCurrently only PostgreSQL is supported. It creates a sync session, it is planned to add async support in the future. You can use this like this:\n\n```python\nfrom creyPY.fastapi.db.session import get_db\n\nasync def test_endpoint(\n    db: Session = Depends(get_db),\n) -\u003e Any:\n    pass\n```\n\n## Constants\n\nThe constants module contains a few enums that I use in my projects. The best way to understand this library is to look at the code (it's not that much). However for simplicity, here is a brief overview:\n\n- LanguageEnum: Contains all languages according to ISO 639\n- CountryEnum: Contains all countries according to ISO 3166\n- CurrencyEnum: Contains all accepted stripe currencies (Commented out are the Zero-decimal currencies, to avoid custom implementation)\n- StripeStatus: Contains all stripe payment statuses\n- GroupMode: Contains time group modes (e.g. day, week, month, year)\n\n### Usage example\n\n```python\nfrom creyPY.const import LanguageEnum\n\nprint(LanguageEnum.EN) # Output: LanguageEnum.EN\nprint(LanguageEnum.EN.value) # Output: English\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreyd%2Fcreypy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreyd%2Fcreypy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreyd%2Fcreypy/lists"}