
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
private-captcha
Advanced tools
pip install private-captcha
from private_captcha import Client
# Initialize the client with your API key
client = Client(api_key="your-api-key-here")
# Verify a captcha solution
try:
result = client.verify(solution="user-solution-from-frontend")
if result.ok():
print("Captcha verified successfully!")
else:
print(f"Verification failed: {result}")
except Exception as e:
print(f"Error: {e}")
from flask import Flask, request
from private_captcha import Client, SolutionError
app = Flask(__name__)
client = Client(api_key="your-api-key")
@app.route('/submit', methods=['POST'])
def submit_form():
try:
# Verify captcha from form data
client.verify_request(request.form)
# Process your form data here
return "Form submitted successfully!"
except SolutionError:
return "Captcha verification failed", 400
from django.http import HttpResponse
from private_captcha import Client, SolutionError
client = Client(api_key="your-api-key")
def submit_view(request):
if request.method == 'POST':
try:
client.verify_request(request.POST)
# Process form data
return HttpResponse("Success!")
except SolutionError:
return HttpResponse("Captcha failed", status=400)
from private_captcha import Client, EU_DOMAIN
client = Client(
api_key="your-api-key",
domain=EU_DOMAIN, # replace domain for self-hosting or EU isolation
form_field="private-captcha-solution", # custom form field name
timeout=10.0, # request timeout in seconds
)
from private_captcha import Client, EU_DOMAIN
# Use EU domain
eu_client = Client(
api_key="your-api-key",
domain=EU_DOMAIN # api.eu.privatecaptcha.com
)
# Or specify custom domain in case of self-hosting
custom_client = Client(
api_key="your-api-key",
domain="your-custom-domain.com"
)
result = client.verify(
max_backoff_seconds=15, # maximum wait between retries
attempts=3 # number of retry attempts
)
This project is licensed under the MIT License - see the LICENSE file for details.
For issues with this Python client, please open an issue on GitHub. For Private Captcha service questions, visit privatecaptcha.com.
FAQs
Python client library for Private Captcha API
We found that private-captcha demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.