Skip to main content

Are You a Human (AYAH) Python integration library and CAPTCHA alternative

Project description

SUMMARY

Copyright (c) 2011 AYAH LLC http://www.areyouahuman.com

BY USING THIS SOFTWARE YOU AGREE TO THE TERMS AND CONDITIONS FOUND AT: http://portal.areyouahuman.com/termsAndConditions

INSTALLATION

The AYAH Python Integration Library is compatible with Python 2.x and 3.x. (It was built and tested on versions 2.7.x and 3.2.x.) Python 3.x requires an extra installation step as described below.

Python 2.x Installation:

  1. Download and extract the appropriate source distribution for your OS.

  2. Install the package:

    python setup.py install

Python 3.x Installation:

  1. Download and extract the appropriate source distribution for your OS.

  2. Convert the package to Python 3.x:

    2to3 -wn ./ayah
  3. Install the package:

    python3 setup.py install

INTEGRATION

The AYAH Python Integration Library is compatible with all web application frameworks.

  1. Get your publisher key and scoring key from https://portal.areyouahuman.com/.

  2. Import the ayah module:

    import ayah
  3. Configure the ayah module when your application initializes:

    ayah.configure(<your-publisher-key>, <your-scoring-key>)
  4. Display the AYAH HTML on any page that requires a human:

    html = ayah.get_publisher_html()

    Django: you can pass this HTML to the view through the context or simply call get_publisher_html() in the template.

  5. Allow the alleged human to complete the PlayThru challenge. When they’re finished, your web page will have a hidden field on it with id=”session_secret”.

  6. Use the value of the hidden session secret field to determine if the alleged human passed the challenge:

    passed = ayah.score_result(<session-secret>)

    Django: the hidden field will be available in your form object:

    if request.method == 'POST':
        form = LoginForm(request.POST)
        if form.is_valid():
            secret = form.cleaned_data['session_secret']
            passed = ayah.score_result(secret)
            # Redirect...
  7. If you’d like to record a conversion with our system, a special bit of HTML will need to be embedded in your ‘conversion’ page. To get that HTML, call the following method:

    html = ayah.record_conversion(<session-secret>)

Congratulations, your application detects humans without requiring CAPTCHA!

Project details


Download files

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

Source Distributions

are-you-a-human-1.0.5.zip (7.8 kB view details)

Uploaded Source

are-you-a-human-1.0.5.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file are-you-a-human-1.0.5.zip.

File metadata

File hashes

Hashes for are-you-a-human-1.0.5.zip
Algorithm Hash digest
SHA256 f22e8e8ef70b671fed119f1808a0a97c4acc0657f06786a30dd5006a0bc367c3
MD5 e38c122f185abb90fa8f0744352b6cce
BLAKE2b-256 a1a1eafa651a4a0209c1662752a23312309212fbdf35bfd4d7761491c608043c

See more details on using hashes here.

File details

Details for the file are-you-a-human-1.0.5.tar.gz.

File metadata

File hashes

Hashes for are-you-a-human-1.0.5.tar.gz
Algorithm Hash digest
SHA256 26f66b511269460446216fd594dd433f3cd2a1cfcf36b97c5ff1c94b460c46ee
MD5 1025e00f460e5fae57ad472bb5510a19
BLAKE2b-256 ece14db1e39cbb50b6e5f6ef888d0c69416b6a75747f012a4cfafa06d6c7bc3b

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