Skip to main content
Help us improve Python packaging – donate today!

A type checking and adapting library

Project Description

Build Status

Expect the unexpected, but get what you want.

@anticipate(int)
def get_int():
  return '1'

assert get_int() == 1

@anticipate(str)
def get_str():
  return 22

assert get_str() == '22'

@anticipate([str])
def get_strs(*args):
  return args

assert list(get_strs(1, 2, 3)) == ['1', '2', '3']

Works much better with your own objects or with SpringField

Release history Release notifications

This version
History Node

0.8.0

History Node

0.7.8

History Node

0.7.7

History Node

0.7.6

History Node

0.7.5

History Node

0.7.4

History Node

0.7.3

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
anticipate-0.8.0.tar.gz (8.2 kB) Copy SHA256 hash SHA256 Source None Dec 1, 2015

Supported by

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