Skip to main content

A Python package containing a small set of utility functions not found in Python's standard library. It is lightweight, written in pure Python, and has no dependencies.

Project description

Lint and Test

Orval (beta)

A Python package containing a small set of utility functions not found in Python's standard library. It is lightweight, written in pure Python, and has no dependencies.

Why is it named orval? Because other utility names are boring and it's a tasty Belgian beer 🤘❤️

🚀 Using

To install this package, run:

pip install orval

Example usage:

from orval import camel_case
camel_case("Great scott")
# Output: greatScott
from orval import kebab_case
kebab_case("Great Scott")
# Output: great-scott
from orval import snake_case
snake_case("Great Scott")
# Output: great_scott
from orval import slugify
slugify("Great scott !! 🤘")
# Output: great-scott
from orval import chunkify
chunkify([1, 2, 3, 4, 5, 6], 2)
# Output: [[1, 2], [3, 4], [5, 6]]
from orval import pretty_bytes
pretty_bytes(1000)
# Output: 1.00 KB (The "human" decimal format, using base 1000)
pretty_bytes(1000, "bs")
# Output: 1000.00 B (Binary format, using base 1024)
pretty_bytes(20000000, "dl", precision=0)
# Output: 20 Megabytes
pretty_bytes(20000000, "dl", precision=0)
# Output: 19 Mebibytes

See all available functions in init.py.

🧑‍💻 Contributing

Prerequisites
1. Install Docker
  1. Go to Docker, download and install docker.
  2. Configure Docker to use the BuildKit build system. On macOS and Windows, BuildKit is enabled by default in Docker Desktop.
2. Install VS Code

Go to VS Code, download and install VS Code.

1. Open DevContainer with VS Code

Open this repository with VS Code, and run Ctrl/⌘ + + PDev Containers: Reopen in Container.

The following commands can be used inside a DevContainer.

2. Run linters

poe lint

3. Run tests

poe test

4. Update poetry lock file

poetry lock --no-update

See how to develop with PyCharm or any other IDE.


️⚡️ Scaffolded with Poetry Copier.
🛠️ Open an issue if you have any questions or suggestions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orval-0.0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

orval-0.0.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file orval-0.0.3.tar.gz.

File metadata

  • Download URL: orval-0.0.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for orval-0.0.3.tar.gz
Algorithm Hash digest
SHA256 de9e92d826528f5c046891827aa4e945262c5ad60ed29f7f32876c8fcb723a35
MD5 a1f9cc499d78dd30402649fd40b2210d
BLAKE2b-256 06495fda25ad57582eac6dbb2311c9b0ae3ca9d8bb25dc2fcfaadf60aef7903f

See more details on using hashes here.

File details

Details for the file orval-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: orval-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for orval-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 99a5a87d74b460e56558b5dac54b4ecd0f602d92ac696e8160941aa1545a8bfd
MD5 db8c4a702f294d13629ef39917aa5bde
BLAKE2b-256 c0dfbbbf1b1c24553a23b7d0bb47c1edc0e3f653e457dd9eb60436ea5df6dba2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page