Skip to content

Commit

Permalink
deploy: 4167d33
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlls committed Nov 29, 2024
0 parents commit e899eae
Show file tree
Hide file tree
Showing 55 changed files with 19,182 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0c8869ed34427f47254da6410ae65501
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
9 changes: 9 additions & 0 deletions _sources/api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _api:

API Reference
===========================

.. automodule:: casefy
:members:
:undoc-members:
:show-inheritance:
83 changes: 83 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Casefy — String casing utilities
================================

Casefy is a lightweight Python package to convert the casing of strings. It has
no dependencies and supports Unicode characters.

You can find the project repository on `GitHub
<https://github.com/dmlls/python-casefy>`_. Any improvements are welcome!

Installation
------------

The latest release can be installed using `pip <https://pypi.org/project/pip/>`_:

.. code-block:: shell
pip install -U casefy
Examples
--------

.. note::

For more details, you can check the :ref:`api`.

.. code-block:: python
import casefy
# camelCase
string = casefy.camelcase("foo_bar")
print(string) # fooBar
string = casefy.camelcase("FooBar")
print(string) # fooBar
string = casefy.camelcase("FOO BAR")
print(string) # fooBar
# snake_case
string = casefy.snakecase("fooBar")
print(string) # foo_bar
string = casefy.snakecase("fooBARbaz", keep_together=["bar"])
print(string) # foo_bar_baz
string = casefy.snakecase("FOO BAR")
print(string) # foo_bar
# CONST_CASE
string = casefy.constcase("fooBar")
print(string) # FOO_BAR
# kebab-case
string = casefy.kebabcase("fooBar")
print(string) # foo-bar
# separator case
string = casefy.separatorcase("fooBar", separator="/")
print(string) # foo/bar
string = casefy.separatorcase("fooBARbaz", separator="%", keep_together=["bar"])
print(string) # foo%bar%baz
# Sentence case
string = casefy.sentencecase("fooBar")
print(string) # Foo bar
Contents
--------

.. toctree::
:maxdepth: 2

api


License
-------
This project is distributed under the `MIT
<https://github.com/dmlls/python-casefy/blob/main/LICENSE>`_ license.
Loading

0 comments on commit e899eae

Please sign in to comment.