Skip to main content

Gives you five. A library to overcomplicate `5`

Project description

Latest Version Build Status Coverage Status

A library to overcomplicate 5. It’s a python port of the javascript five.

Install

$ pip install five

Usage

from five import Five
five = Five()

Basic 5

five()  # 5

Addition

five() + five()  # 10

Multiplication

five() * five()  # 25

Division

five() / five()  # 1

Different sorts of 5

five.up_high()  # ⁵
five.down_low()  # ₅
five.too_slow()  # 5, with a 555-millisecond delay
five.roman()  # V
five.morse_code()  # di-di-di-di-dah
five.negative()  # -5
five.loud()  # FIVE
five.loud('piglatin')  # IVEFAY
five.smooth()  # S

5 goes multilingual

five.arabic()  # خمسة
five.azerbaijani()  # beş
five.basque()  # bost
five.belarusian  # пяць
five.bosnian()  # pet
five.bulgarian()  # пет
five.catalan()  # cinc
five.chinese()  # 五
five.choctaw()  # tahlapi
five.croatian()  # pet
five.czech()  # pět
five.dovah()  # hen
five.dutch()  # vijf
five.elvish()  # lempe
five.english()  # Five
five.estonian()  # viis
five.finnish()  # viisi
five.french()  # cinq
five.german()  # fünf
five.greek()  # πέντε
five.hebrew()  # חמש
five.hindi()  # पांच
five.hungarian()  # öt
five.indonesian()  # lima
five.irish()  # cúig
five.italian()  # cinque
five.japanese()  # 五
five.kannada()  # ಐದು
five.klingon()  # vagh
five.korean()  # 오
five.latin()  # quinque
five.latvian()  # pieci
five.lithuanian()  # penki
five.mongolian()  # таван
five.norwegian()  # fem
five.persian()  # پنج
five.piglatin()  # ivefay
five.polish()  # pięć
five.portuguese()  # cinco
five.romanian()  # cinci
five.russian()  # пять
five.serbian()  # pet
five.slovakian()  # päť
five.slovenian()  # pet
five.spanish()  # cinco
five.swedish()  # fem
five.tamil()  # ஐந்து
five.telugu()  # ఐదు
five.thai()  # ห้า
five.turkish()  # beş
five.ukrainian()  # п’ять
five.welsh()  # pump

Different radices

five.binary()  # 101
five.octal()  # 5
five.hex()  # 5

Map and Reduce

five.map([1, 2, 3])  # [5, 5, 5]
five.reduce([1, 2, 3])  # 5

Novelty

five.fab()  # ['Juwan Howard','Ray Jackson','Jimmy King','Jalen Rose','Chris Webber']
five.jackson()  # ['Jackie','Tito','Jermaine','Marlon','Michael']

Rotation

five.rotate("five.py")  #knaj.ud

Unicode

five.oclock()  # '🕔'

Development

run the tests:

$ pip install -r dev-requirements.txt
$ invoke test

Credits

All the glories should belong to [@jackdcrawford][], I just port it to python :)

License

MIT.

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

five-0.1.2.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file five-0.1.2.tar.gz.

File metadata

  • Download URL: five-0.1.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for five-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3429e7e156b32c2f47db960246f71b41c12fdfd45f835e810459e208143956ad
MD5 bffdd290c391bf82f842bf7d65630587
BLAKE2b-256 5f5cc9e537101273fba82e40d67848c5deff6c87d808a5b7b2809e0d3511d785

See more details on using hashes here.

Supported by

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