Skip to main content

sentence-url

A port of the NPM package readable-url to generate readable random phrases to add to dynamically generated URLs.

GitHub repository

To generate readable URLs like Twitch's clips.

Example: https://clips.twitch.tv/WiseAcceptableSnoodPupper

Get started

To install:

pip install readable-url

To import:

from sentence-url import SentenceURL

Usage Instructions

"""
Takes 3 parameters.
1. An integer value - The number of words to be generated in the string. (Between 2 and 10).
2. A boolean value - If true, returns string in CamelCase, else lowercase.
3. A string - The seperator between the words.
"""

generator = SentenceURL() # 3, True, '' are the default values.

#generator = SentenceURL(False, 5, '-') # Other options.

To generate a random phrase:

url = generator.generate()
print(url); # Prints out 'ForgetfulHarshEgg'

This can be used to add to the end of a URL.

Example: https://example.com/photos/ForgetfulHarshEgg

For best results, use an integer value of 3, 4, or 5.

Metadata

Release files for sentence-url 0.0.1

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

Source distribution (sdist)

Source distribution for sentence-url 0.0.1
File Size Uploaded
sentence-url-0.0.1.tar.gz 1.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sentence-url 0.0.1
File Interpreter ABI Platform
sentence_url-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 kB

Release files / sentence-url-0.0.1.tar.gz

Download URL sentence-url-0.0.1.tar.gz
Size 1.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cca197fe5db0233affc46932ebb9fe273c2aecf6dc4740ef22538fdc183fa6a7
BLAKE2b-256 checksum
How to use checksums
c55388a598ec152b52901eddf96d6705ad269f549299fb1c07343d27b77de22b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / sentence_url-0.0.1-py3-none-any.whl

Download URL sentence_url-0.0.1-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d177a4bb667c600790841de31f9919a73ff20de6a5b68f8acdd059ffcdb1957e
BLAKE2b-256 checksum
How to use checksums
d1177bc4464bda1a76f6999220adab128200b30efb7929283ec2abcc950cc316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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