Skip to main content

A package to parse sign up genius form responses

Project description

signup-genius

A library for parsing signup-genius responses from the signup html, as a free alternative to a paid Signup Genius subscription.

Install

pip install signup-genius

Usage

from signup_genius import get_signups

signups = get_signups('https://www.signup-genius.com/go/xyz...')

The signup objects returned will vary depending on the type of signup genius encountered.

For example for a simple yes/no response with adult / child counts the signup will look like:

class Signup:
    name: str
    response: str
    comments: str = ''
    adult_count: int = 0
    child_count: int = 0

Whereas for a signup-genius with Date / Location / Time and multiple slots with capacities, it will look like:

class Signup:
    name: str
    comments: str = ''
    count: int = 0
    slot: Slot

# where the embedded slot object is:

class Slot:
    date: str
    location: str
    time: str
    name: str
    comments: str = ""
    capacity: int = 1
    filled: int = 0

Name Mapping

Often times it is useful to coerce the signup names returned to a known set of names, e.g. a club or organization whose menbers are known but where there may be variations in how those names are entered in the signup genius ... Jeff vs. Jeffrey, amy vs Amy, etc.

2 Options are supported:

An explicit mapping from what is entered to the final representation

mapping = {'Jeff Adams': 'Jeffrey Adams'}
signups = get_signups(url, name_mapping=mapping)

Where a signup is updated, an _original_name attribute will be added to the object allowing you to detect after the fact which signups have been updated

Fuzzy matching against a population of names

You can supply a population of known names, and any names not matching this population will be mapped to the closest match (using Levenshtein distance).

known_names = ['Jeffrey Adams', 'John Doe', Amy Malone']
signups = get_signups(url, match_names=known_names)

Again the signups that are updated will be annotated with an _original_name attribute.

Signup Genius Variants supported

So far the following variants are supported:

  • Yes / No / Maybe responses with guest count
  • Yes / No / Maybe responses with adult, child counts
  • Date / Time / Slot signups
  • Date / Location / Time / Slot signups

The call to get_signups will first inspect the signup genius to interpret the variant, and use the appropriate parser. If the variant is not known then a UnsupportedVariant exception will be raised

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

signup_genius-0.0.10.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

signup_genius-0.0.10-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file signup_genius-0.0.10.tar.gz.

File metadata

  • Download URL: signup_genius-0.0.10.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for signup_genius-0.0.10.tar.gz
Algorithm Hash digest
SHA256 5af74d48b4c4c66c7bf98d2eb0867ae6155ec2d417365feeed80e0da6704d213
MD5 050275b9f704a9a510971be602f5a0cf
BLAKE2b-256 9c477af2edb6133d19eec8bdacb2c008550efdd24f3b349f31c5e1b79c1b743a

See more details on using hashes here.

File details

Details for the file signup_genius-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for signup_genius-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d3bd7dbfb5d67c2836b56c3325c49e3d99e736dca9b84921f33b348f76695451
MD5 b74f68cfd77093f7e326f82fd6844b4d
BLAKE2b-256 0991471dc0492dbd6b3a4d34f180bcea594f2c97d272e725a3d22ad7edde37d5

See more details on using hashes here.

Supported by

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