Skip to main content

Python Helpers

This package includes multiple helpers for string, email and urls.

Use


Str Helper


Is a String

Validate if the given value is string type

from bakle_helpers.str import Str

Str.is_a_string('Test') # True
Str.is_a_string(12345) # False

Ends With

Validate if a string ends with the given value

from bakle_helpers.str import Str

# Validate with case sensitive
Str.ends_with('Hello Pyhton', 'ton') # True
Str.ends_with('Hello Pyhton', 'Ton') # False
Str.ends_with('Hello Pyhton', 'not') # False

# Validate with case insensitive
Str.ends_with('Hello Pyhton', 'ton', True) # True
Str.ends_with('Hello Pyhton', 'Ton', True) # True
Str.ends_with('Hello Pyhton', 'not', True) # False

Starts With

Validate if a string starts with the given value

from bakle_helpers.str import Str

# Validate with case sensitive
Str.starts_with('Hello Pyhton', 'He') # True
Str.starts_with('Hello Pyhton', 'he') # False
Str.starts_with('Hello Pyhton', 'lo') # False

# Validate with case insensitive
Str.starts_with('Hello Pyhton', 'He', True) # True
Str.starts_with('Hello Pyhton', 'he', True) # True
Str.starts_with('Hello Pyhton', 'lo', True) # False

After

Returns everything after the given string

from bakle_helpers.str import Str

Str.after('test@mail.com', '@') # mail.com

Before

Returns everything before the given string

from bakle_helpers.str import Str

Str.before('test@mail.com', '@') # test

Contains

Validate if the given value is in the given string

from bakle_helpers.str import Str

# Validate with case sensitive
Str.contains('Hello Python', 'Python') # True
Str.contains('Hello Python', 'python') # False
Str.contains('Hello Python', 'World') # False

# Validate with case sensitive
Str.contains('Hello Python', 'Python', True) # True
Str.contains('Hello Python', 'python', True) # True
Str.contains('Hello Python', 'World', True) # False

Limit

Returns the truncated string by the specific length

from bakle_helpers.str import Str

# With ellipses
Str.limit('Lorem ipsum', 8) # Lorem ip...

# Without ellipses
Str.limit('Lorem ipsum', 8, False) # Lorem ip

Random

Returns a random string of the specific length

from bakle_helpers.str import Str

Str.random(8) # OxPMUwHC


Email Helper


Is valid

Validate if the given email is valid

from bakle_helpers.str import Email

Email.is_valid('test@mail.com') # True
Email.is_valid('test') # False

Random

Returns a random email

from bakle_helpers.str import Email

Email.random() # leota@hotmail.com


Url Helper


Is valid()

Validate if the given url is valid

from bakle_helpers.str import Url

Url.is_valid('http://test.com') # True
Url.is_valid('test') # False

Random()

Returns a random url

from bakle_helpers.str import Url

Url.random() # http://www.tippetttroymii.com

Metadata

Release files for Bakle-Helpers 0.1.3

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

Source distribution (sdist)

Source distribution for Bakle-Helpers 0.1.3
File Size Uploaded Provenance
Bakle Helpers-0.1.3.tar.gz 13.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Bakle-Helpers 0.1.3
File Interpreter ABI Platform
Bakle_Helpers-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / Bakle Helpers-0.1.3.tar.gz

Download URL Bakle Helpers-0.1.3.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e595f0628210f3bcd83410ba75dfab78d0e523ee0527653b5da5017e974e13c9
BLAKE2b-256 checksum
How to use checksums
f8560fb3edac59a642428085087556d86da97c462381b5fbd8de4d0808d6991d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / Bakle_Helpers-0.1.3-py3-none-any.whl

Download URL Bakle_Helpers-0.1.3-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f768e1b27e03bedcd2df7da28d55f351a240c39615240afb9d9815a53105a2d1
BLAKE2b-256 checksum
How to use checksums
08c607c9b32deb41d085bce7f532eb743f40dffe14f5beb510769f2209094fa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for Bakle-Helpers 0.1.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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