semvec/pypi-packages huggingface dataset:
govuk-country-register 0.5.0
Jinja2 filter to look up country codes using the GOV.UK country and territory registers
License: MIT

# govuk-country-register

Jijna2 filter that uses GOV.UK Registers to look up country codes.

The register data is included in the package so no external requests are required.
This package will be updated when new register data is released.

## Usage

```
import jinja2

from govuk_country_register import to_country

to_country("UK")  # "United Kingdom"

jinja_env = jinja2.Environment()
jinja_env.filters["to_country"] = to_country
```

## Version History

2019-08-16 version 0.5.0

- Update country data

2019-06-06 version 0.4.0

- Refactor code to load CSVs from a Python package

2019-06-06 version 0.3.1

- Fix bug where unicode characters would cause issues on systems with the default locale

2019-03-14 version 0.3.0

- Update country data

2019-02-12 version 0.2.2

- Fix PyPI readme

2019-02-12 version 0.2.1

- Initial release
subclass-register 1.0.1
Automatically log all new subclasses of a specified base class.
License: MIT

Subclass Register
=================

.. image:: https://readthedocs.org/projects/subclass-register/badge/?version=latest
    :target: https://subclass-register.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status


Motivation
----------

This library implements a simple clas decorator that you can apply to a base class. This decorator then hooks into the way the decorated class is subclassed, adding all new subclasses to a dictionary whose keys are class names and values are the classes themselves.

The motivation for this project was to autogenerate deep learning models from pure JSON files, thus ensuring reproducibility of the results. I do, however, think that it is ideal for any kind of codebase where we want to generate safe code from configuration files.


Installation instructions
-------------------------

The subclass register can be installed with ``pip``:

.. code::

    pip install subclass-register

by cloning this repo and running ``setup.py``

.. code::

    git clone https:\\github.com\yngvem\subclass-register
    cd subclass-register
    python setup.py

or by simply downloading the ``src\subclass_register\subclass_register.py`` file and the ``LISENCE`` file into your project.

Example
-------

Here is a basic example of how to use the subclass register.

.. code:: python

    from subclass_register import SubclassRegister


    register = SubclassRegister('car')

    @register.link_base
    class BaseCar:
        pass

    class SUV(BaseCar):
        def __init__(self, horse_powers):
            self.horse_powers = horse_powers

    suv = register['SUV'](horse_powers = 50)

You can read more examples at the `documentation page
<https://subclass-register.readthedocs.io/en/latest/?badge=latest>`_.