Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Generates beautiful urls similar to Gfycat.

Project description


# BeautifURL

## Installation

BeautifURL can be installed from pip

pip install beautifurl

## Usage

>>> from beautifurl import Beautifurl
>>> beautifurl = Beautifurl()
>>> beautifurl.get_random_url('aaA')
>>> beautifurl.count_permutations('aaA')
>>> for url in beautifurl.get_permutations('aaA', shuffle=True):
...     print(url)

GloriousDeterminedPeafowl NiceSuccessfulJackal DepressedStupidPartridge StormyStrangeGiraffe AngryPleasantMonkey …

### Url format

The examples above have a format string as their first argument. This dictates which types of words the url should be made up of. The examples all use adjective adjective Animal. Any number or combination of keys may be used. A full list of keys is available below.

### Custom dictionaries

The Beautifurl object __init__ function takes an optional parameter dictionaryPath. This allows the default dictionaries to be swapped for user specified dictionaries.

>>> beautifurl = Beautifurl(dictionaryPath='~/dictionaries')

The dictionaries in this folder must be named KEY_… where KEY is a single character. All keys should be unique. Any characters after the underscore are ignored. See dictionaries folder for examples.

## Dictionaries

Key | Description | Size |
— | ———– | —- |
a | Adjectives | 223 |
A | Animals | 211 |

## Contributing

### Wordlists

Additional words and lists may be submitted in pull requests. Please run the new lists through the organise script located in the dictionaries folder.

Please ensure you have permission to use any lists before submitting a pull request. If a license is required please name the license file license.LIST_NAME.

./organise LIST_NAME [MAX_SIZE] > tmp mv tmp LIST_NAME

### Code

Pull requests are more than welcome.

Project details

Download files

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

Files for beautifurl, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size beautifurl-0.1.4-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size beautifurl-0.1.4.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page