Skip to main content

Open Source Python SDK for Checktica - AI-written text detector.

Project description

Checktica Python SDK

PyPI version Python 3.13+ License Tests Coverage

Open Source Python SDK for Checktica - detect AI-generated text with high accuracy.

Features

  • 🎯 99%+ accuracy in detecting AI-generated content
  • 🚀 Multiple detection methods from fastest to most accurate
  • 📦 Simple API - just one function to call
  • 🔄 Automatic retries with smart error handling
  • 📝 No length limits on text analysis
  • 🆓 Free API access

Installation

Install Checktica using uv:

uv add checktica

Quick Start

Step 1: Import the SDK

from checktica import detect

Step 2: Check Your Text

text = """
    AI detectors help distinguish between human and AI-generated writing.
    Checktica offers high accuracy, a free Python SDK, and no text length limits.
"""

result = detect(text)

Step 3: Interpret Results

if result.is_llm_generated:
    print(f"AI-generated (confidence: {result.confidence:.2%})")
    print(f"Remarks: {result.remarks}")
else:
    print(f"Human-written (confidence: {result.confidence:.2%})")

Detection Methods

Checktica provides five detection methods with different speed/accuracy tradeoffs:

Method Speed Accuracy Best For
most_accurate Slowest Highest Critical decisions, academic integrity
more_accurate Slow Very High Important content verification
balanced Medium High General purpose use
fast Fast Good Real-time filtering
fastest Fastest Acceptable Bulk processing

Choosing a Detection Method

# Use the most accurate method (default, recommended)
result = detect(text, detection_method="most_accurate")

# Use faster method for bulk processing
result = detect(text, detection_method="fastest")

# Balanced approach for most cases
result = detect(text, detection_method="balanced")

Understanding Results

The detect() function returns a DetectionResult object with three fields:

result = detect(text)

# Is the text AI-generated?
print(result.is_llm_generated)  # True or False

# Confidence score (0.0 to 1.0)
print(result.confidence)  # e.g., 0.95 means 95% confident

# Additional context about the detection
print(result.remarks)  # e.g., "None."

More Examples

Check out the examples/ directory for complete working examples:

Development Setup

Want to contribute? Here's how to set up your development environment:

Step 1: Clone the Repository

git clone https://github.com/checktica/checktica-python.git
cd checktica-python

Step 2: Install Dependencies

This project uses uv for dependency management:

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv sync

Step 3: Run Tests

# Run all tests with coverage
uv run pytest

# View coverage report
open htmlcov/index.html  # macOS
xdg-open htmlcov/index.html  # Linux

Step 4: Code Quality

We use Ruff for linting and formatting:

# Format code
uv run ruff format .

# Check for issues
uv run ruff check .

# Fix auto-fixable issues
uv run ruff check --fix .

Step 5: Pre-commit Hooks

Set up pre-commit hooks to automatically check code quality:

uv run pre-commit install

Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/amazing-feature).
  3. Make your changes.
  4. Test your changes (uv run pytest tests/).
  5. Commit your changes (git commit -m 'feat: Add amazing feature').
  6. Push to the branch (git push origin feature/amazing-feature).
  7. Open a Pull Request.

Please ensure:

  • All tests pass (uv run pytest).
  • Code is formatted (uv run ruff format .).
  • Linting passes (uv run ruff check .).
  • Coverage remains at 100%.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

Built with ❤️ by the Checktica team.

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

checktica-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

checktica-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file checktica-0.1.0.tar.gz.

File metadata

  • Download URL: checktica-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for checktica-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93172936777e3da00d094858286fe32670b5ec846fabf9d7cfa23ab2f1866dcd
MD5 9c7001aad9828e749bb753fce7081fc8
BLAKE2b-256 c5943473db9cf14ae16f6756ebf15c0eb4fb17a290235badd2e680815b98b8ee

See more details on using hashes here.

File details

Details for the file checktica-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: checktica-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for checktica-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e28d456e5d749f40442ba5b4559e5849442d63e0e18fdd98b770f33f468d3d31
MD5 669f4fedc4f69a7db83352b76e25846e
BLAKE2b-256 dd7ace1391ddffb23933a05357b5d44a98f747d0f112519ab6da34a9140078ac

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