Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keptcha

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keptcha

keptcha is an API wrapper for https://captcha-api.akshit.me written in Python.

  • 0.1.2
  • Source
  • PyPI
  • Socket score

Maintainers
1

Keptcha py

keptcha is an API wrapper (python) for captcha-api. Provides both Synchronous and Asynchronous interfaces to interact with the API.

Installation

pip install keptcha

OR using git

pip install git+https://github.com/captcha-api/keptcha-py

Usage

keptcha supports both Sync and Async usage.

Sync

from keptcha import Captcha

my_captcha = Captcha.new()
my_captcha.decode()

if my_captcha.verify("1337H4kOr"):
    print("You are not a bot!")

Async

from keptcha import AsyncCaptcha

my_captcha = await AsyncCaptcha.new()
await my_captcha.decode()

if (await my_captcha.verify("1337H4kOr")):
    print("You are not a bot!")

Configuration

You can pass some keyword arguments to personalize your captcha.

my_captcha = Captcha.new(height=100, width=250, circles=100, length=5)

How to handle bad input?

You can do exception handling.

from keptcha.errors import IncorrectCaptcha

try:
    my_captcha.verify("bad input")
except IncorrectCaptcha:
    print("sir you suck")

Contributing

Feel free to submit a pull request. We very much appreciate it!

License

Licenced under MIT.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc