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.8.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.8-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nopecha-1.0.8.tar.gz
Algorithm Hash digest
SHA256 55f1cd4441d9e955d7e9dc75bc9b9ed75adad0336d034b9d44020d57f77d7745
MD5 ab7ce1dab25cd21af1253700922f7f0c
BLAKE2b-256 43d423a002be19efa951356fa032dad7a3e1ba92365506d8deb08eded4df2b9b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nopecha-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8e3a145350fa9b2a31273d0b53ee569d7e72a2fd29b12e42ce304ba3667ad943
MD5 6b862d2ec81d8a4adca825044c4f37e4
BLAKE2b-256 b5ae5fb860aaf8911686cb4ced16b0be07ce1f360540b7f7ee56fabae86ba1e3

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