darknight (dk)
Install
pip install darknight
If your project tracks dependencies in requirements.txt:
darknight
or in pyproject.toml:
dependencies = [
"darknight",
]
Configure
Copy the example env file and fill in your own values:
cp .env.example .env
DK_ENDPOINT=openai # or "anthropic"
DK_BASE_URL=https://api.openai.com/v1
DK_API_KEY=sk-...
DK_MODEL=gpt-4o
Or configure programmatically instead of / on top of .env:
import dk
dk.configure(
endpoint="openai",
base_url="https://api.openai.com/v1",
api_key="sk-...",
model="qwen3-vl-",
)
Solve a single CAPTCHA
import dk
res = dk.solve("/path/to/your/captcha.png") # pass a file path in .png / .jpg / .jpeg
res = dk.solve("captcha_b64string") # or a base64 / data-URI image string
print(res) # eg: "Cx5b"
Solve a batch (.json dataset)
results = dk.solve("dataset.json")
Dataset format:
[
{"id": "001", "label": "4vNf", "b64_string": "<base64 PNG/JPEG>"}
]
RAG memory + feedback
Every dk.solve() call automatically reads from a single, universal,
disk-persisted RAG store (~/.darknight/rag/rag.json) for hints from past
captchas. But correctness isn't knowable at solve() time, so nothing is
written until you report the real outcome:
import dk
res = dk.solve("/path/to/your/captcha.png") # pass a file path in .png / .jpg / .jpeg
correct = submit_to_website(res) # verification step
dk.feedback(correct) # writes this records into the RAG store
dk.feedback() always applies to the most recent dk.solve() call. If you
call dk.solve() again before giving feedback on the previous one, only captchas that received feedback will be stored.
dk.clear_rag() # clear the RAG store
Metadata
Release files for darknight 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| darknight-0.1.2.tar.gz | 41.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| darknight-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.1 kB
Release files / darknight-0.1.2.tar.gz
| Download URL | darknight-0.1.2.tar.gz |
|---|---|
| Size | 41.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f7b8eff514f50e40a5c9e89ff04a17f8c457ffa3052ebbe0c46ee99e63789f3
|
|
BLAKE2b-256 checksum How to use checksums |
92b2e34ba6a3d0df91796dd56b942521103399bb9e1ee33c670bb327cc938dda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / darknight-0.1.2-py3-none-any.whl
| Download URL | darknight-0.1.2-py3-none-any.whl |
|---|---|
| Size | 49.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd05454a00c7ce3eb0d7f42e53bc1a0285c336786241609d43af7e27d41ff56d
|
|
BLAKE2b-256 checksum How to use checksums |
4fc12ab616445b48c0fcf65911e73f99dd062eb3b9371c0036488efd7fb6ad90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for darknight 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.