Skip to main content

NopeCHA Python Library

Project description

NopeCHA Python Library

The NopeCHA Python library provides convenient access to the NopeCHA API from applications written in the Python language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.

Supported CAPTCHA types:

  • reCAPTCHA v2
  • reCAPTCHA v3
  • reCAPTCHA Enterprise
  • hCaptcha
  • hCaptcha Enterprise
  • FunCAPTCHA
  • AWS WAF CAPTCHA
  • Text-based CAPTCHA

Documentation

See the NopeCHA API docs.

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

pip install --upgrade nopecha

Install from source with:

python setup.py install

Usage

The library needs to be configured with your account's secret key which is available on the website. Either set it as the NOPECHA_API_KEY environment variable before using the library:

export NOPECHA_API_KEY='...'

Or set nopecha.api_key to its value:

import nopecha
nopecha.api_key = "..."

# solve a recognition challenge
clicks = nopecha.Recognition.solve(
    type='hcaptcha',
    task='Please click each image containing a cat-shaped cookie.',
    image_urls=[f"https://nopecha.com/image/demo/hcaptcha/{i}.png" for i in range(9)],
)

# print the grids to click
print(clicks)

# solve a token
token = nopecha.Token.solve(
    type='hcaptcha',
    sitekey='ab803303-ac41-41aa-9be1-7b4e01b91e2c',
    url='https://nopecha.com/demo/hcaptcha',
)

# print the token
print(token)

# get the current balance
balance = nopecha.Balance.get()

# print the current balance
print(balance)

Requirements

  • Python 3.7.1+

In general, we want to support the versions of Python that our customers are using. If you run into problems with any version issues, please let us know at support@nopecha.com.

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

nopecha-1.0.9.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nopecha-1.0.9-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file nopecha-1.0.9.tar.gz.

File metadata

  • Download URL: nopecha-1.0.9.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for nopecha-1.0.9.tar.gz
Algorithm Hash digest
SHA256 07643507d9afc85dfbfba240b0fb6531c9e0db12317fbc67fd3d527e1aa5646a
MD5 85396184c63ce296d3ef182989fe52b4
BLAKE2b-256 4ccc0d6c53e14ef6909b4aa674bf7c91ec04fa6eca53e1c32944e9db0c76f4c9

See more details on using hashes here.

File details

Details for the file nopecha-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: nopecha-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for nopecha-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d4ebf990b3e184742a44c6ce546eb5c3f939305e9dc6f45f3e83be8c9126a998
MD5 837b009edf02aa6fc8126496fb2cf9a7
BLAKE2b-256 619d0eabc8abade006eb68de93b6d8e4f46bfc97f05fdeab404d591d473e2cea

See more details on using hashes here.

Supported by

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