Skip to main content

Experimental loaders for the enopy library

Project description

enopy-exploaders

Experimental loaders for the enopy library

Installation

pip install enopy-exploaders

Currently available loaders

These loaders are currently available in the experimental track:

  • enum (generate with enum_factory(choices), accepts any of choices, returns the value unaltered or raises an error)

Example

You can use the loaders with enopy as demonstrated in this example.

>>> from enopy import parse
>>> from enopy_exploaders import enum_factory

>>> beach_item = enum_factory(['beach ball', 'sunscreen', 'shovel'])

>>> input = """
...   good-choice: sunscreen
...   bad-choice: motor oil
... """

>>> document = parse(input)

>>> document.field('good-choice', beach_item)
'sunscreen'
>>> document.field('bad-choice', beach_item)
ValidationError: 'bad-choice' must be one of 'beach ball', 'sunscreen', 'shovel'.

Purpose

Trying out new, innovative, cool and stupid loader ideas and seeing how they fit into real life usecases. Based on the findings they might be repackaged, integrated into the enopy core, or something else entirely.

Questions to explored

Translations

There could be a considerable amount of useful loaders, which all will require one or multiple error messages each - how can the translations for this be managed, versioned, updated, etc.?

From the insights gained with the core eno libraries it is safe to say that if there is to be some form of a shared translation repository, it should probably be shared by all (exp)loaders packages across different programming languages.

Categorization

How should the loaders be categorized? Types (numbers, strings, ...)? Fields (IT, Communication, Geography)? Countries (International, country specific)?

API

How are the loaders imported, accessed and used in applications?

Scope

What kinds of loaders are actually sensible and useful to bundle for everyone, and where do we reach the limit of including too much bloat?

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
enopy_exploaders-0.2.0-py3-none-any.whl (2.8 kB) Copy SHA256 hash SHA256 Wheel py3
enopy-exploaders-0.2.0.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page