This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Overview

EasyEntry enter data into a program and easily check if they are valid.

Uses dictionaries to define the properties of the data:

  • type: str, int, float, date, time, email, passwd and menu.
  • default: sets a default by pressing the return key
  • options: defines a list of allowed values: [‘a’, ‘b’,…]
  • minmax: sets minimum and maximum limits for a value: [0, 100]
  • required: defines the obligation or not to introduce a value: True or False
  • and others (See the property list).

Example:

import easyentry as ee

ee.global_required = True

person = {}
person['name'] = {'type':'str'}
person['city'] = {'type':'str', 'default':'Seville'}
person['age']  = {'type':'int', 'minmax': [0,100]}
person['height']  = {'type':'float'}
person['bicycle']  = {'type':'str', 'options': ['y','n']}
person['datetrip'] = {'type':'date', 'default': 'now'}
person['email'] = {'type':'email', 'required': False}

name = ee.entry('What is your name?', (person, 'name'))
city = ee.entry('What city you live?', (person, 'city'))
age = ee.entry('How old are you?', (person, 'age'))
height = ee.entry('Height?', (person, 'height'))
bicycle = ee.entry('Do you have a bicycle?', (person, 'bicycle'))
datetrip = ee.entry('Date of trip?', (person, 'datetrip'))
email = ee.entry('Your email address', (person, 'email'))

Creates a options menu

To build a menu:

person['info'] = {'type':'menu', 'title':'Select an option', 'options':['phone','mail','none'], 'rindex':True}
info = ee.entry('To receive information by...', (person, 'info'))

Options:

  • rindex: With True returns the number of the selected option
  • sorted: sort the list of options (True/False)

Output:

To receive information by...
(1) phone
(2) mail
(3) none
Select an option [3]:

Password

Enter a password:

person['passwd'] = {'type':'passwd'}

passwd = ee.entry('Enter password', (person, 'passwd'))
repeat = ee.entry('Repeat password', (person, 'passwd'))

if passwd == repeat:
    print(passwd)

Property list

Properties of the data types available:

  • str: required, options or minmax and default
  • int: required, options or minmax and default
  • float: required, options or minmax and default
  • date: required, options or mixmax and default:date or now
  • time: required, options or mixmax and default:time or now
  • password: required
  • email: required
  • menu: required, title, options, default, sorted and rindex

Constants

The constants are used to set the values that define the general behavior of EasyEntry:

# Message to be displayed when data is not valid:
# - You can type the message in your language
# - If the value is omitted, the default is the current (in English)

ee.error_message = 'Invalid input, please try again'

# Set format 'date' and 'time':
# - Date format: '%Y-%m-%d' -> YYYY-MM-DD (default)
# - Hour format: '%H:%M:%S' -> HH:MM:SS   (default)

ee.date_format = '%d-%m-%Y'
ee.time_format = '%H:%M'

# Set the type of numerical data (int and float):
# - True and value = '' : var int   -> return 0
#                         var float -> return 0.0
# - False (default) and value = '': return ''

ee.strict_return = False

# Establish whether it is mandatory to enter a valid value or
# an empty entry (press return) is allowed
# - True  -> You must enter a valid value in all fields
# - False -> The field can be empty (default)
# The value of the 'required' property of a field overrides
# the global value

ee.global_required = True
Release History

Release History

0.0.9

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
easyentry-0.0.9-py2.py3-none-any.whl (9.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 10, 2015
easyentry-0.0.9.tar.gz (19.6 kB) Copy SHA256 Checksum SHA256 Source Sep 10, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting