Python humanize functions

Overview

humanize

PyPI version Supported Python versions Documentation Status PyPI downloads GitHub Actions status codecov MIT License Tidelift

This modest package contains various common humanization utilities, like turning a number into a fuzzy human-readable duration ("3 minutes ago") or into a human-readable size or throughput. It is localized to:

  • Bengali
  • Brazilian Portuguese
  • Catalan
  • Danish
  • Dutch
  • European Portuguese
  • Finnish
  • French
  • German
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Persian
  • Polish
  • Russian
  • Simplified Chinese
  • Slovak
  • Slovenian
  • Spanish
  • Swedish
  • Turkish
  • Ukrainian
  • Vietnamese

API reference

https://python-humanize.readthedocs.io

Usage

Integer humanization

>>> import humanize
>>> humanize.intcomma(12345)
'12,345'
>>> humanize.intword(123455913)
'123.5 million'
>>> humanize.intword(12345591313)
'12.3 billion'
>>> humanize.apnumber(4)
'four'
>>> humanize.apnumber(41)
'41'

Date & time humanization

>>> import humanize
>>> import datetime as dt
>>> humanize.naturalday(dt.datetime.now())
'today'
>>> humanize.naturaldelta(dt.timedelta(seconds=1001))
'16 minutes'
>>> humanize.naturalday(dt.datetime.now() - dt.timedelta(days=1))
'yesterday'
>>> humanize.naturalday(dt.date(2007, 6, 5))
'Jun 05'
>>> humanize.naturaldate(dt.date(2007, 6, 5))
'Jun 05 2007'
>>> humanize.naturaltime(dt.datetime.now() - dt.timedelta(seconds=1))
'a second ago'
>>> humanize.naturaltime(dt.datetime.now() - dt.timedelta(seconds=3600))
'an hour ago'

Precise time delta

>> humanize.precisedelta(delta, suppress=["days"], format="%0.4f") '49 hours and 33.1230 seconds'">
>>> import humanize
>>> import datetime as dt
>>> delta = dt.timedelta(seconds=3633, days=2, microseconds=123000)
>>> humanize.precisedelta(delta)
'2 days, 1 hour and 33.12 seconds'
>>> humanize.precisedelta(delta, minimum_unit="microseconds")
'2 days, 1 hour, 33 seconds and 123 milliseconds'
>>> humanize.precisedelta(delta, suppress=["days"], format="%0.4f")
'49 hours and 33.1230 seconds'

Smaller units

If seconds are too large, set minimum_unit to milliseconds or microseconds:

>>> import humanize
>>> import datetime as dt
>>> humanize.naturaldelta(dt.timedelta(seconds=2))
'2 seconds'
>> humanize.naturaldelta(delta, minimum_unit="microseconds") '4 milliseconds'">
>>> delta = dt.timedelta(milliseconds=4)
>>> humanize.naturaldelta(delta)
'a moment'
>>> humanize.naturaldelta(delta, minimum_unit="milliseconds")
'4 milliseconds'
>>> humanize.naturaldelta(delta, minimum_unit="microseconds")
'4 milliseconds'
>> humanize.naturaltime(delta, minimum_unit="microseconds") '4 milliseconds ago'">
>>> humanize.naturaltime(delta)
'now'
>>> humanize.naturaltime(delta, minimum_unit="milliseconds")
'4 milliseconds ago'
>>> humanize.naturaltime(delta, minimum_unit="microseconds")
'4 milliseconds ago'

File size humanization

>>> import humanize
>>> humanize.naturalsize(1_000_000)
'1.0 MB'
>>> humanize.naturalsize(1_000_000, binary=True)
'976.6 KiB'
>>> humanize.naturalsize(1_000_000, gnu=True)
'976.6K'

Human-readable floating point numbers

>>> import humanize
>>> humanize.fractional(1/3)
'1/3'
>>> humanize.fractional(1.5)
'1 1/2'
>>> humanize.fractional(0.3)
'3/10'
>>> humanize.fractional(0.333)
'333/1000'
>>> humanize.fractional(1)
'1'

Scientific notation

>> humanize.scientific(1**10) '1.00 x 10⁰' >>> humanize.scientific(1**10, precision=1) '1.0 x 10⁰' >>> humanize.scientific(1**10, precision=0) '1 x 10⁰'">
>>> import humanize
>>> humanize.scientific(0.3)
'3.00 x 10⁻¹'
>>> humanize.scientific(500)
'5.00 x 10²'
>>> humanize.scientific("20000")
'2.00 x 10⁴'
>>> humanize.scientific(1**10)
'1.00 x 10⁰'
>>> humanize.scientific(1**10, precision=1)
'1.0 x 10⁰'
>>> humanize.scientific(1**10, precision=0)
'1 x 10⁰'

Localization

How to change locale at runtime:

>> humanize.naturaltime(dt.timedelta(seconds=3)) '3 секунды назад' >>> humanize.i18n.deactivate() >>> humanize.naturaltime(dt.timedelta(seconds=3)) '3 seconds ago'">
>>> import humanize
>>> import datetime as dt
>>> humanize.naturaltime(dt.timedelta(seconds=3))
'3 seconds ago'
>>> _t = humanize.i18n.activate("ru_RU")
>>> humanize.naturaltime(dt.timedelta(seconds=3))
'3 секунды назад'
>>> humanize.i18n.deactivate()
>>> humanize.naturaltime(dt.timedelta(seconds=3))
'3 seconds ago'

You can pass additional parameter path to activate to specify a path to search locales in.

FileNotFoundError: [Errno 2] No translation file found for domain: 'humanize' >>> humanize.i18n.activate("pt_BR", path="path/to/my/own/translation/") ">
>>> import humanize
>>> humanize.i18n.activate("xx_XX")
<...>
FileNotFoundError: [Errno 2] No translation file found for domain: 'humanize'
>>> humanize.i18n.activate("pt_BR", path="path/to/my/own/translation/")

How to add new phrases to existing locale files:

$ xgettext --from-code=UTF-8 -o humanize.pot -k'_' -k'N_' -k'P_:1c,2' -l python src/humanize/*.py  # extract new phrases
$ msgmerge -U src/humanize/locale/ru_RU/LC_MESSAGES/humanize.po humanize.pot # add them to locale files

How to add a new locale:

$ msginit -i humanize.pot -o humanize/locale/<locale name>/LC_MESSAGES/humanize.po --locale <locale name>

Where is a locale abbreviation, eg. en_GB, pt_BR or just ru, fr etc.

List the language at the top of this README.

Comments
  • 🐑 Add seperate typing hints for humanize

    🐑 Add seperate typing hints for humanize

    Adds a collection of .pyi files that describe the expected type signatures of the publicly available humanize functions.

    A MANIFEST.in file has been added to include the new .pyi files and the py.typed file to indicate to mypy that this package supports typing.

    mypy has been added to the pre-commit configuration to check the stubs.

    Some of the signatures are slightly optimistic, since depending on error conditions, different types are returned.

    changelog: Added 
    opened by coiax 15
  • PyInstaller cannot find the humanize distribution

    PyInstaller cannot find the humanize distribution

    I found this problem when I used the packaging program(pyinstaller) to package a python program.

    It seems that there is a problem in retrieving the package. When I change back to the old version(v0.5.5), there is no such problem

    I'm a novice. I can't find any specific problems

    2020-02-13_192856

    opened by Gaoyongxian666 15
  • Fix: AP style for 0 is 'zero'

    Fix: AP style for 0 is 'zero'

    Fixes #72.

    Changes proposed in this pull request:

    • AP style for 0 is "zero", not "0"
    • The Associated Press Stylebook (p. 203) says:
      • Spell out whole numbers up to (and including) nine (e.g., zero, one, 10, 96, 104).
    • https://apvschicago.com/2011/05/numbers-spell-out-or-use-numerals.html

    Before

    >>> import humanize
    >>> humanize.apnumber(0)
    '0'
    >>> humanize.apnumber(1)
    'one'
    >>> humanize.apnumber(2)
    'two'
    >>>
    

    After

    >>> import humanize
    >>> humanize.apnumber(0)
    'zero'
    >>> humanize.apnumber(1)
    'one'
    >>> humanize.apnumber(2)
    'two'
    >>>
    
    bug changelog: Fixed 
    opened by hugovk 12
  • humanize overflows before datetime does

    humanize overflows before datetime does

    What did you do?

    I tried to humanize a very long time.

    What did you expect to happen?

    I expect the time to be converted into years/millenia/eon if it is within the bounds of datetime i.e. <= 999 999 999 days, and if the number is higher than that or uncountable with the compute platform (64/32 bits) then something like "longer than countable".

    At the very least, this type of error should be handled like others in _date_and_delta: the timedelta is returned unaltered.

    What actually happened?

    I received an overflow error from an operation within humanize.

    What versions are you using?

    • OS: Ubuntu x64
    • Python: 3.9.6
    • Humanize: 3.13.1

    Please include code that reproduces the issue.

    The best reproductions are self-contained scripts with minimal dependencies.

    import datetime as dt
    import humanize
    d = dt.timedelta(days=999999999)
    print(d)
    h = humanize.naturaldelta(d)
    print(h)
    # ... e/time.py", line 131, in _date_and_delta
    #    date = now - value
    # OverflowError: date value out of range
    

    Once we discuss how to best handle this error, I'd be happy to open a PR.

    opened by carterbox 11
  • Support milliseconds, microseconds etc.

    Support milliseconds, microseconds etc.

    If you run something for a minute, humanize is great. If you want to tell the user what you did in that time (100.000 things), and then want to brag about how fast that is (a moment per thing?), humanize is not super-great any more :)

    opened by bersbersbers 10
  • Importing humanize is slow

    Importing humanize is slow

    I have noticed that importing humanize noticeably increases the startup time of my CLI. After doing some importtime analysis, I think the underlying problem is that importing pkg_resources is slow.

    • https://github.com/pypa/setuptools/issues/926
    • https://github.com/pydata/numexpr/issues/291

    Is is it possible to replace the usage of pkg_resources.get_distribution in __init__.py with something that isn't as expensive to import?

    opened by ashwin153 9
  • Allow custom

    Allow custom "now" in naturaldelta and naturaltime

    This allows having a different point in time to which a value is compared. Useful if one is dealing with datetimes that are not in the local timezone.

    Fixes #55.

    Changes proposed in this pull request:

    • both naturaldelta and naturaltime now expose an optional now parameter
    • both methods may now be used with datetime objects that are not in the local timezone
    enhancement 
    opened by phijor 9
  • Do not issue deprecation warnings during import

    Do not issue deprecation warnings during import

    Prior to this change, the Unit enum would issue a deprecation warning during import when its __dict__ was accessed. This is not correct: the warning should only be issued if the enum is actually accessed.

    This change ensures that no deprecation warnings are issued by the enum during import.

    Fixes #242.

    e.g:

    $ python -Werror
    >>> from humanize import time
    >>> time.Unit.DAYS
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/samuelsearles-bryant/dev/samueljsb/humanize/src/humanize/time.py", line 50, in __getattribute__
        warnings.warn(
    DeprecationWarning: `Unit` has been deprecated. The enum is still available as the private member `_Unit`.
    
    changelog: Fixed 
    opened by samueljsb 8
  • Test on Python 3.10.0 final

    Test on Python 3.10.0 final

    Python 3.10.0 final was released yesterday.

    Let's update the CI to test on 3.10 final instead of 3.10-dev dev versions.

    Edit .github/workflows/test.yml and change the version.

    help wanted good first issue Hacktoberfest 
    opened by hugovk 8
  • Documentation improvements

    Documentation improvements

    Changes proposed in this pull request:

    • Fix clamp() arguments not being correctly rendered with mkdocstrings.
    • Use include-markdown plugin to include "Usage" section of README inside Home.
    • Don't allow to select >>> text nodes inside codeblocks. For pycon code blocks use the recipe suggested by mkdocstrings ~~and for python codeblocks a Javascript function with a CSS class~~.
    • Install mkdocstrings with the legacy Python handler as extra (mkdocstrings[python-legacy]>=0.18). See About the Python handlers in mkdocstrings documentation.
    changelog: Added documentation 
    opened by mondeja 7
  • adds when parameter to precisedelta and adds precisetime function

    adds when parameter to precisedelta and adds precisetime function

    Fixes #

    Changes proposed in this pull request:

    • adds when parameter to precisedelta()
    • adds precisetime() function which is like naturaltime() but uses precisedelta()

    Couple minor things:

    • fix the when parameter in naturaldelta() being incorrectly listed as a datetime.timedelta (its not)
    • i use Pycharm which appears to have done some auto-formatting in the naturaldelta() function
    opened by HexCodeFFF 7
Releases(4.0.0)
  • 4.0.0(Feb 13, 2022)

    Removed

    • Drop support for Python 3.6 (#239) @hugovk
    • Remove deprecated VERSION, use version instead (#253) @hugovk
    • Remove when from naturaldelta() and allow largest timedelta (#250) @carterbox
    • Remove deprecated private function aliases (#241) @samueljsb
    Source code(tar.gz)
    Source code(zip)
  • 3.14.0(Jan 30, 2022)

    Changed

    • Don't deprecate time.Unit enumeration (#252) @hugovk
    • Use humanize.intcomma to format years in time module (#246) @carterbox

    Deprecated

    • Deprecate when parameter of naturaldelta (#248) @carterbox
    Source code(tar.gz)
    Source code(zip)
  • 3.13.1(Nov 29, 2021)

  • 3.13.0(Nov 29, 2021)

    Added

    • Add da_DK language (#238) @dejurin
    • Fix and add Russian and Ukrainian words (#235) @dejurin
    • Add missing strings for Polish translation (#182) @kpostekk
    • Add Traditional Chinese (zh-HK) (#233) @edwardmfho

    Changed

    • Remove redundant setuptools from install_requires (#232) @arthurzam

    Deprecated

    • This is the last release to support Python 3.6
    • Deprecate private functions (#234) @samueljsb
    • Reinstate VERSION and deprecate (#240) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 3.12.0(Oct 6, 2021)

    Added

    • Add support for Python 3.10 (#223) @hugovk

    Changed

    • Use importlib.metadata to get package version instead of pkg_resources.get_distribution to decrease memory consumption (#227) @akayunov

    Fixed

    • Fix incorrect type in comment for 'when' (#222) @pfw
    Source code(tar.gz)
    Source code(zip)
  • 3.11.0(Aug 1, 2021)

  • 3.10.0(Jul 5, 2021)

  • 3.9.0(Jun 15, 2021)

  • 3.8.0(Jun 12, 2021)

  • 3.7.1(Jun 6, 2021)

    Fixed

    • Include generated translation binaries in release (#211) @hugovk
    • Update release checklist so translation binaries aren't forgotten (#212) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 3.7.0(Jun 2, 2021)

  • 3.6.0(May 29, 2021)

    Added

    • Add pluralization for intword (#202) @mondeja
    • Add es_ES '%s and %s' translation (#206) @mondeja
    • Add gender support for ordinals (#207) @mondeja
    • Add type hints for all exposed natural* functions (#208) @WhyNotHugo
    Source code(tar.gz)
    Source code(zip)
  • 3.5.0(Apr 30, 2021)

    Added

    • Add intword processing for thousands (#200) @gliptak

    Changed

    • Update translation .po files with 'thousand' (#201) @hugovk
    • Remove generated translation binaries from repo (#199) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 3.4.1(Apr 12, 2021)

  • 3.4.0(Apr 11, 2021)

    Added

    • Add Catalan translation (#192) @jordimas

    Changed

    • Add documentation and release notes to project_urls (#196) @hugovk

    Fixed

    • Fix tests for Python 3.10 (#195) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 3.3.0(Mar 20, 2021)

  • 3.2.0(Dec 12, 2020)

    Added

    • Internationalise intcomma and add fr_FR (#183) @hugovk

    Changed

    • Apply setup-py-upgrade (#178) @graingert
    • Test Python 3.9 final on Travis CI (#176) @jaimcamp

    Fixed

    • Fix grammar mistake in the Dutch translations (#181) @mildblimp
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Oct 19, 2020)

    Added

    • Declare support for Python 3.9 (#171) @jaimcamp
    • testing/docs: Include doctests in testing (#168) @carlpatt
    • Allow custom "now" in naturaldelta and naturaltime (#144) @phijor

    Fixed

    • Represent with a zero if the delta is too small (#170) @eldipa
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Oct 2, 2020)

  • 3.0.0(Sep 30, 2020)

    Added

    • Add explicit setuptools dependency for pkg_resources (#158) @mgorny

    Removed

    • Drop support for Python 3.5 (#151) @hugovk

    Fixed

    • Update minimum_unit handling of naturaldelta and naturaltime (#142) @hugovk
    • Internationalise a previously hardcoded 'and' (#163) @hugovk
    • Update docs (#153) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Aug 13, 2020)

    Added

    • Deploy docs to Read the Docs (#148) @hugovk
    • Build API reference docs from docstrings using MKDocs (#147) @hugovk
    • Function to represent timedeltas without losing precision (precisedelta) (#137) @eldipa

    Changed

    • Improve default locale path discovering. (#146) @mondeja

    Fixed

    • Added Ukrainian language to list in README.md (#141) @tuxlabore
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(Jul 5, 2020)

  • 2.4.1(Jun 27, 2020)

    Fixed

    • Explicit error if _DEFAULT_LOCALE_PATH is None (#132) @eldipa
    • Fix incorrect Portuguese spelling (#135) @webkaiyo
    • Fix fractional(0.333) output in README (#134) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Apr 23, 2020)

  • 2.3.0(Apr 6, 2020)

  • 2.2.0(Mar 23, 2020)

  • 2.1.0(Mar 20, 2020)

    Added

    • Add ndigits option to intcomma (#123) @hugovk
    • Show more than bytes for negative file sizes (#122) @hugovk

    Fixed

    • Fix: AP style for 0 is 'zero' (#121) @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Mar 5, 2020)

    Note: Humanize 1.1.0 was meant to be tagged 2.0.0 because it drops support for Python 2, so is also released as 2.0.0. If you still support Python 2, use Humanize 1.0.0.

    Added

    • Disambiguate naturaldate return: only append year if more than ~5 months away (#107) @hugovk
    • Add scientific notation to string support (#110) @Thx3r @hugovk
    • Add micro- and millisecond units to naturaldelta and naturaltime (#104) @hugovk

    Changed

    • Disambiguate naturaldate return: only append year if more than ~5 months away (#107) @hugovk
    • Convert remaining tests to use pytest.mark.parametrize (#109) @hugovk
    • Refactor some tests to use pytest.mark.parametrize (#108) @hugovk

    Removed

    • Drop support for EOL Python 2 (#102) @hugovk

    Fixed

    • Fix intword returning 1000.0 million instead of 1.0 billion (#113) @Jasarin-V @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Mar 5, 2020)

    Note: This was meant to be tagged 2.0.0 because it drops support for Python 2, and is also released as 2.0.0. If you still support Python 2, use Humanize 1.0.0.

    Added

    • Disambiguate naturaldate return: only append year if more than ~5 months away (#107) @hugovk
    • Add scientific notation to string support (#110) @Thx3r @hugovk
    • Add micro- and millisecond units to naturaldelta and naturaltime (#104) @hugovk

    Changed

    • Disambiguate naturaldate return: only append year if more than ~5 months away (#107) @hugovk
    • Convert remaining tests to use pytest.mark.parametrize (#109) @hugovk
    • Refactor some tests to use pytest.mark.parametrize (#108) @hugovk

    Removed

    • Drop support for EOL Python 2 (#102) @hugovk

    Fixed

    • Fix intword returning 1000.0 million instead of 1.0 billion (#113) @Jasarin-V @hugovk
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 8, 2020)

    • Supports Python 2.7 and 3.5+
    • Version 1.x is the last to support EOL Python 2.7
    • Add new translations:
      • German
      • Persian
      • Dutch
      • Finnish
      • Brazilian Portuguese
      • Indonesian
      • Italian
      • Japanese
      • Simplified Chinese
      • Slovak
      • Turkish
      • Vietnamese
    • Update translations:
      • French
      • Korean
      • Russian
    • Include tests in release source tarball
    • Python 3.6 invalid escape sequence deprecation fixes
    • Use built-in mock from unittest when available (Python 3.4+)
    Source code(tar.gz)
    Source code(zip)
Owner
Jason Moiron
Jason Moiron
A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct.

torcp A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct. Usage: python3 torcp.py -h Exa

ccf2012 105 Dec 22, 2022
A simple API that will return a key-value pair of randomly generated UUID

A simple API that will return a key-value pair of randomly generated UUID. Key will be a timestamp and value will be UUID. While the server is running, whenever the API is called, it should return al

Pius Lucky 2 Jan 18, 2022
This is a package that allows you to create a key-value vault for storing variables in a global context

This is a package that allows you to create a key-value vault for storing variables in a global context. It allows you to set up a keyring with pre-defined constants which act as keys for the vault.

Data Ductus 2 Dec 14, 2022
Daiho Tool is a Script Gathering for Windows/Linux systems written in Python.

Daiho is a Script Developed with Python3. It gathers a total of 22 Discord tools (including a RAT, a Raid Tool, a Nuker Tool, a Token Grabberr, etc). It has a pleasant and intuitive interface to faci

AstraaDev 32 Jan 05, 2023
Find dependent python scripts of a python script in a project directory.

Find dependent python scripts of a python script in a project directory.

2 Dec 05, 2021
Just some scripts to export vector tiles to geojson.

Vector tiles to GeoJSON Nowadays modern web maps are usually based on vector tiles. The great thing about vector tiles is, that they are not just imag

Lilith Wittmann 77 Jul 26, 2022
'ToolBurnt' A Set Of Tools In One Place =}

'ToolBurnt' A Set Of Tools In One Place =}

MasterBurnt 5 Sep 10, 2022
Check the basic quality of any dataset

Data Quality Checker in Python Check the basic quality of any dataset. Sneak Peek Read full tutorial at Medium. Explore the app Requirements python 3.

MalaDeep 8 Feb 23, 2022
Analyze metadata of your Python project.

Analyze metadata of your Python projects Setup: Clone repo py-m venv venv (venv) pip install -r requirements.txt specify the folders which you want to

Pedro Monteiro de Carvalho e Silva Prado 1 Nov 10, 2021
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 08, 2022
Small project to interact with python, C, HTML, JavaScript, PHP.

Micro Hidroponic Small project to interact with python, C, HTML, JavaScript, PHP. Table of Contents General Info Technologies Used Screenshots Usage P

Filipe Martins 1 Nov 10, 2021
Kanye West Lyrics Generator

aikanye Kanye West Lyrics Generator Python script for generating Kanye West lyrics Put kanye.txt in the same folder as the python script and run "pyth

4 Jan 21, 2022
A dictionary that can be flattened and re-inflated

deflatable-dict A dictionary that can be flattened and re-inflated. Particularly useful if you're interacting with yaml, for example. Installation wit

Lucas Sargent 2 Oct 18, 2021
python script to generate color coded resistor images

Resistor image generator I got nerdsniped into making this. It's not finished at all, and the code is messy. The end goal it generate a whole E-series

MichD 1 Nov 12, 2021
DiddiParser 2: The DiddiScript parser.

DiddiParser 2 The DiddiScript parser, written in Python. Installation DiddiParser2 can be installed via pip: pip install diddiparser2 Usage DiddiPars

Diego Ramirez 3 Dec 28, 2022
ticktock is a minimalist library to view Python time performance of Python code.

ticktock is a minimalist library to view Python time performance of Python code.

Victor Benichoux 30 Sep 28, 2022
Aggregating gridded data (xarray) to polygons

A package to aggregate gridded data in xarray to polygons in geopandas using area-weighting from the relative area overlaps between pixels and polygons.

Kevin Schwarzwald 42 Nov 09, 2022
Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft

uvtt2fgu Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft This program wo

Andre Kostur 29 Dec 05, 2022
Color getter (including method to get random color or complementary color) made out of Python

python-color-getter Color getter (including method to get random color or complementary color) made out of Python Setup pip3 install git+https://githu

Jung Gyu Yoon 2 Sep 17, 2022
Macro recording and metaprogramming in Python

macro-kit is a package for efficient macro recording and metaprogramming in Python using abstract syntax tree (AST).

8 Aug 31, 2022