Skip to main content

Generates readable URLs like Twitch's clips

Project description

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.

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

sentence-url-0.0.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

sentence_url-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file sentence-url-0.0.1.tar.gz.

File metadata

  • Download URL: sentence-url-0.0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for sentence-url-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cca197fe5db0233affc46932ebb9fe273c2aecf6dc4740ef22538fdc183fa6a7
MD5 9f3027b3eabae0ac9f03a93f99a15f49
BLAKE2b-256 c55388a598ec152b52901eddf96d6705ad269f549299fb1c07343d27b77de22b

See more details on using hashes here.

File details

Details for the file sentence_url-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sentence_url-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for sentence_url-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d177a4bb667c600790841de31f9919a73ff20de6a5b68f8acdd059ffcdb1957e
MD5 6c778ed8898ead0ea622bd870face6d6
BLAKE2b-256 d1177bc4464bda1a76f6999220adab128200b30efb7929283ec2abcc950cc316

See more details on using hashes here.

Supported by

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