Skip to main content

Deprecated

  • This repository was merged into anycase, and is now published as py-anycase on PyPI
  • This package now simply re-exports the py-anycase package.

pycases

PyPI version License Build Status

A case conversion library for Python.

Features

  • Automatic case detection, no need to specify the input case
  • Extremely fast, written in Rust ✨
  • Support for Unicode characters
  • Support for providing acronyms in title case

Supported cases

Function Output
cases.to_camel(s) camelCase
cases.to_pascal(s) PascalCase
cases.to_snake(s) snake_case
cases.to_screaming_snake(s) SCREAMING_SNAKE_CASE
cases.to_kebab(s) kebab-case
cases.to_screaming_kebab(s) SCREAMING-KEBAB-CASE
cases.to_train(s) Train-Case
cases.to_lower(s) lower case
cases.to_title(s) Title Case
cases.to_upper(s) UPPER CASE

Getting started

Install using

pip install pycases

Now convert a string using the relevant function.

import cases

cases.to_snake("XMLHttpRequest") # returns "xml_http_request"

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

Metadata

Release files for pycases 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycases 0.1.4
File Size Uploaded Provenance
pycases-0.1.4.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pycases 0.1.4
File Interpreter ABI Platform
pycases-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / pycases-0.1.4.tar.gz

Download URL pycases-0.1.4.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc84c6fc14dcdfcd2a724d62cbd311eceb6405dab080fd7f643d0bb234d3edc5
BLAKE2b-256 checksum
How to use checksums
d0de89993d65917ce67221183e8ec9da692a64f2957386d531205ec42a97a8e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pycases-0.1.4-py3-none-any.whl

Download URL pycases-0.1.4-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97d58dec2fac5e2eff72c7360b3f603d0d15f822139692bde10293df328a321a
BLAKE2b-256 checksum
How to use checksums
784dd24051665c468a4b5e5817daa0389dcc3de6e14526263d648cd4476e1ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for pycases 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page