{"id":18918550,"url":"https://github.com/daxartio/casers","last_synced_at":"2025-07-16T12:05:20.044Z","repository":{"id":153444924,"uuid":"626579363","full_name":"daxartio/casers","owner":"daxartio","description":"String case converter for Python written in Rust. Pydantic. FastAPI","archived":false,"fork":false,"pushed_at":"2025-03-14T13:05:54.000Z","size":373,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T14:04:58.146Z","etag":null,"topics":["change-case","fastapi","pydantic","pyo3","python","rust"],"latest_commit_sha":null,"homepage":"","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/daxartio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-04-11T18:48:56.000Z","updated_at":"2025-03-14T13:05:57.000Z","dependencies_parsed_at":"2024-11-08T10:34:40.711Z","dependency_job_id":"c96bb79d-cc5a-46df-af8f-f1d6a7f437ea","html_url":"https://github.com/daxartio/casers","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/daxartio/casers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxartio%2Fcasers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxartio%2Fcasers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxartio%2Fcasers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxartio%2Fcasers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daxartio","download_url":"https://codeload.github.com/daxartio/casers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxartio%2Fcasers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265508078,"owners_count":23779069,"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":["change-case","fastapi","pydantic","pyo3","python","rust"],"created_at":"2024-11-08T10:32:28.274Z","updated_at":"2025-07-16T12:05:19.956Z","avatar_url":"https://github.com/daxartio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# casers\n\n[![PyPI](https://img.shields.io/pypi/v/casers)](https://pypi.org/project/casers/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/casers)](https://www.python.org/downloads/)\n[![GitHub last commit](https://img.shields.io/github/last-commit/daxartio/casers)](https://github.com/daxartio/casers)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/casers)\n[![GitHub stars](https://img.shields.io/github/stars/daxartio/casers?style=social)](https://github.com/daxartio/casers)\n\n## Features\n\n| case     | example     |\n|----------|-------------|\n| camel    | `someText`  |\n| snake    | `some_text` |\n| kebab    | `some-text` |\n| pascal   | `SomeText`  |\n| constant | `SOME_TEXT` |\n\n## Installation\n\n```\npip install casers\n```\n\n## Usage\n\nThe examples are checked by pytest\n\n```python\n\u003e\u003e\u003e from casers import to_camel, to_snake, to_kebab\n\n\u003e\u003e\u003e to_camel(\"some_text\") == \"someText\"\nTrue\n\n\u003e\u003e\u003e to_snake(\"someText\") == \"some_text\"\nTrue\n\n\u003e\u003e\u003e to_kebab(\"someText\") == \"some-text\"\nTrue\n\u003e\u003e\u003e to_kebab(\"some_text\") == \"some-text\"\nTrue\n\n```\n\n### pydantic\n\n```\npip install \"casers[pydantic]\"\n```\n\nThe package supports for pydantic 2\n\n```python\n\u003e\u003e\u003e from casers.pydantic import CamelAliases\n\n\u003e\u003e\u003e class Model(CamelAliases):\n...     snake_case: str\n\n\u003e\u003e\u003e Model.model_validate({\"snakeCase\": \"value\"}).snake_case == \"value\"\nTrue\n\u003e\u003e\u003e Model.model_validate_json('{\"snakeCase\": \"value\"}').snake_case == \"value\"\nTrue\n\n```\n\n## Benchmark\n\nApple M3 Pro\n\n```\n----------------------------------------------------------------------------------------------- benchmark: 5 tests -----------------------------------------------------------------------------------------------\nName (time in us)                             Min                   Max               Mean             StdDev             Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ntest_to_camel_rust                         2.4580 (1.0)         10.7919 (1.0)       2.5684 (1.0)       0.0955 (1.0)       2.5420 (1.0)      0.0410 (1.0)     2123;2123      389.3475 (1.0)       79208           1\ntest_to_camel_python_builtin              10.3328 (4.20)        90.1250 (8.35)     10.7271 (4.18)      0.8965 (9.39)     10.6669 (4.20)     0.2082 (5.08)    1182;1739       93.2215 (0.24)      57419           1\ntest_to_camel_rust_parallel               20.1249 (8.19)       102.2089 (9.47)     29.5715 (11.51)     4.0862 (42.79)    28.4170 (11.18)    4.8331 (117.94)    855;158       33.8163 (0.09)       4783           1\ntest_to_camel_python_builtin_parallel     36.4999 (14.85)    1,233.1251 (114.26)   39.9730 (15.56)    19.0205 (199.20)   38.1658 (15.01)    0.8328 (20.32)     95;1059       25.0169 (0.06)       8741           1\ntest_to_camel_pure_python                 39.4580 (16.05)      212.9169 (19.73)    40.6741 (15.84)     3.1588 (33.08)    40.2501 (15.83)    0.4161 (10.15)    614;2145       24.5857 (0.06)      21878           1\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\nLegend:\n  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.\n  OPS: Operations Per Second, computed as 1 / Mean\n```\n\n## License\n\n* [MIT LICENSE](LICENSE)\n\n## Contribution\n\n[Contribution guidelines for this project](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxartio%2Fcasers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaxartio%2Fcasers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxartio%2Fcasers/lists"}