Skip to main content

Official Python SDK for AiondTech Resume Analyser API

Project description

AiondTech Resume Analyser SDK

Official Python SDK for the AiondTech Resume Analyser API.

PyPI version Python Versions License: MIT

Installation

pip install aiondtech

Quick Start

from aiondtech import ResumeAnalyser

# Initialize client
client = ResumeAnalyser(api_key="your-api-key")

# Or use environment variable
# export AIONDTECH_API_KEY="your-api-key"
client = ResumeAnalyser()

# Production mode
client = ResumeAnalyser(api_key="your-api-key", production=True)

Constructor Parameters

Parameter Type Default Description
api_key str None API key (or set AIONDTECH_API_KEY env var)
base_url str None Custom API base URL
timeout int 120 Request timeout in seconds
production bool False Use production URL (https://api.aiondtech.com)

API Endpoints

Credit usage varies depending on resume size and complexity. Every response includes the actual credits_used — always check it for accurate tracking.

Method Credits Description
resumes.upload() Varies Upload PDF resume
resumes.upload_and_analyze() Varies Upload + AI parsing
resumes.upload_analyze_compare() Varies Upload + parse + compare to job
resumes.analyze() Varies Parse existing resume by ID
resumes.compare_resumes() Varies Compare resume to job
resumes.list() 0 List all resumes
jobs.create() Varies Create job posting
jobs.list() 0 List all jobs
credits.balance() 0 Check credit balance
credits.usage() 0 View usage history

Tracking credits:

result = client.resumes.upload_and_analyze("resume.pdf")
print(f"This call used {result.credits_used} credits")

balance = client.credits.balance()
print(f"Remaining: {balance['remaining']}")

Detailed Usage

1. Upload Resume

Upload a PDF resume without parsing. Returns a resume_id for later use.

result = client.resumes.upload("path/to/resume.pdf")

Return type: ResumeUploadResult

result.resume_id     # int — Unique resume ID
result.message       # str — "Resume uploaded successfully"
result.credits_used  # int — Credits consumed by this call
result._raw          # dict — Full raw API response

2. Upload and Analyze Resume

Upload a PDF and immediately extract structured data (AI-powered parsing).

result = client.resumes.upload_and_analyze("path/to/resume.pdf")

Return type: ResumeAnalysisResult

result.resume_id     # int — Unique resume ID
result.parsed_data   # dict — Full parsed data (see structure below)
result.credits_used  # int — Credits consumed by this call
result._raw          # dict — Full raw API response

# Convenience properties
result.full_name         # str | None
result.email             # str | None
result.skills            # list[str]
result.job_titles        # list[str]
result.total_experience  # str | None

parsed_data structure:

{
    "full_name": "John Doe",
    "email": "john@example.com",
    "contact_number": "+1234567890",
    "linkedin": "linkedin.com/in/johndoe",
    "location": "New York, NY",
    "skills": ["Python", "Django", "AWS"],
    "job_titles": ["Senior Developer", "Tech Lead"],
    "companies": ["Google", "Meta"],
    "education": ["BSc Computer Science - MIT"],
    "total_experience": "8 years",
    "certifications": ["AWS Certified Solutions Architect"],
    "summary": "Experienced software engineer..."
}

3. Upload, Analyze, and Compare

Upload a resume, parse it, and compare against a job posting in one call.

result = client.resumes.upload_analyze_compare("resume.pdf", job_id=42)

Return type: ResumeComparisonResult

result.resume_id         # int — Resume ID
result.job_id            # int — Job ID compared against
result.comparison_score  # float — Match score (0-100)
result.comparison_reason # str — Detailed reasoning
result.language          # str | None — Detected language (e.g. "en", "ar")
result.parsed_data       # dict | None — Parsed resume data
result.credits_used      # int — Credits consumed by this call
result._raw              # dict — Full raw API response

4. Analyze Resume by ID

Parse an already-uploaded resume by its ID.

result = client.resumes.analyze(resume_id=123)

Return type: ParsedResumeResult

result.resume_id     # int — Resume ID
result.partner       # str — Partner identifier
result.parsed_data   # dict — Full parsed data
result.credits_used  # int — Credits consumed by this call
result._raw          # dict — Full raw API response

# Convenience properties
result.full_name         # str | None
result.email             # str | None
result.phone             # str | None
result.linkedin          # str | None
result.location          # str | None
result.skills            # list[str]
result.job_titles        # list[str]
result.companies         # list[str]
result.education         # list[str]
result.total_experience  # str | None
result.certifications    # list[str]

5. Create Job Posting

Create a new job posting to compare resumes against.

job = client.jobs.create(
    title="Senior Python Developer",
    description="We are looking for an experienced Python developer..."
)

Return type: JobResult

job.job_id       # int — Unique job ID
job.title        # str — Job title
job.description  # str — Job description
job.created_by   # str — Creator identifier
job.created_at   # str | None — Creation timestamp
job.credits_used # int — Credits consumed by this call
job._raw         # dict — Full raw API response

6. Compare Resume to Job

Compare an existing resume against an existing job posting.

result = client.resumes.compare_resumes(resume_id=123, job_id=456)

Return type: ResumeComparisonResult

result.resume_id         # int — Resume ID
result.job_id            # int — Job ID
result.comparison_score  # float — Match score (0-100)
result.comparison_reason # str — Detailed reasoning
result.credits_used      # int — Credits consumed by this call
result._raw              # dict — Full raw API response

7. List Resumes

List all uploaded resumes with pagination.

result = client.resumes.list(page=1, limit=50)

Return type: ResumeListResult

result.resumes   # list[dict] — List of resume objects
result.total     # int — Total number of resumes
result.page      # int — Current page
result.limit     # int — Items per page
result.has_more  # bool — Whether more pages exist
result._raw      # dict — Full raw API response

# Iterable
for resume in result:
    print(resume["id"], resume.get("full_name"))

len(result)  # Number of resumes on this page

8. List Jobs

List all job postings with pagination.

result = client.jobs.list(page=1, limit=50)

Return type: JobListResult

result.jobs      # list[dict] — List of job objects
result.total     # int — Total number of jobs
result.page      # int — Current page
result.limit     # int — Items per page
result.has_more  # bool — Whether more pages exist
result._raw      # dict — Full raw API response

# Iterable
for job in result:
    print(job["id"], job["title"])

9. Check Credit Balance

balance = client.credits.balance()

Returns: dict

{
    "total": 1000,
    "used_mtd": 150,
    "remaining": 850,
    "plan_name": "Professional",
    "resets_at": "2026-03-01T00:00:00Z"
}

10. Credit Usage History

usage = client.credits.usage()
# Or with date filters
usage = client.credits.usage(start_date="2026-01-01", end_date="2026-01-31")

Error Handling

from aiondtech import (
    ResumeAnalyser,
    APIError,
    AuthenticationError,
    InsufficientCreditsError,
    ValidationError,
    NotFoundError,
    RateLimitError,
)

client = ResumeAnalyser(api_key="your-api-key")

try:
    result = client.resumes.upload_and_analyze("resume.pdf")
except AuthenticationError as e:
    print(f"Invalid API key: {e}")
except InsufficientCreditsError as e:
    print(f"Not enough credits: {e}")
    print(f"Remaining: {e.credits_remaining}")
    print(f"Required: {e.credits_required}")
except ValidationError as e:
    print(f"Invalid input: {e}")
except NotFoundError as e:
    print(f"Resource not found: {e}")
except RateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after} seconds")
except APIError as e:
    print(f"API error [{e.status_code}]: {e.message}")

Complete Workflow Example

from aiondtech import ResumeAnalyser

client = ResumeAnalyser(api_key="your-api-key")

# Step 1: Create a job posting
job = client.jobs.create(
    title="Senior Python Developer",
    description="5+ years Python, Django, AWS, PostgreSQL required..."
)
print(f"Created job #{job.job_id}: {job.title}")
print(f"Credits used: {job.credits_used}")

# Step 2: Upload and analyze a resume
analysis = client.resumes.upload_and_analyze("candidate_resume.pdf")
print(f"Candidate: {analysis.full_name}")
print(f"Skills: {', '.join(analysis.skills)}")
print(f"Experience: {analysis.total_experience}")
print(f"Credits used: {analysis.credits_used}")

# Step 3: Compare resume to job
comparison = client.resumes.compare_resumes(
    resume_id=analysis.resume_id,
    job_id=job.job_id
)
print(f"Score: {comparison.comparison_score}%")
print(f"Language: {comparison.language}")
print(f"Reasoning: {comparison.comparison_reason}")
print(f"Credits used: {comparison.credits_used}")

# Step 4: Check remaining credits
balance = client.credits.balance()
print(f"Credits remaining: {balance['remaining']}")

One-Step Workflow (Upload + Analyze + Compare)

result = client.resumes.upload_analyze_compare("resume.pdf", job_id=job.job_id)
print(f"Score: {result.comparison_score}% — {result.comparison_reason}")
print(f"Credits used: {result.credits_used}")

Batch Processing

import os

job = client.jobs.create("Data Scientist", "ML, Python, statistics...")

total_credits = job.credits_used
results = []

for pdf in os.listdir("resumes/"):
    if pdf.endswith(".pdf"):
        r = client.resumes.upload_analyze_compare(
            f"resumes/{pdf}", job_id=job.job_id
        )
        results.append(r)
        total_credits += r.credits_used
        print(f"{r.comparison_score:5.1f}% — {pdf} ({r.credits_used} credits)")

# Sort by score
results.sort(key=lambda x: x.comparison_score, reverse=True)
print(f"\nTop candidate: resume_id={results[0].resume_id} ({results[0].comparison_score}%)")
print(f"Total credits used: {total_credits}")

Environment Variables

# Set your API key
export AIONDTECH_API_KEY="your-api-key"

# Optional: Custom base URL
export AIONDTECH_BASE_URL="https://api.aiondtech.com"
from aiondtech import ResumeAnalyser

# Client automatically uses environment variables
client = ResumeAnalyser()

Support

License

MIT License - see LICENSE for details.

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

aiondtech-2.2.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

aiondtech-2.2.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file aiondtech-2.2.0.tar.gz.

File metadata

  • Download URL: aiondtech-2.2.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for aiondtech-2.2.0.tar.gz
Algorithm Hash digest
SHA256 5f23e15bbea50be94a81eadf826a58320aed6f7c32108bba8136c1baa07ae2e3
MD5 cbd43212a8a1bec95c759926c067202b
BLAKE2b-256 5bcff6188658caa317558df7fe64245b4fb8077bb88dbd558b2e917684fc1d16

See more details on using hashes here.

File details

Details for the file aiondtech-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: aiondtech-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for aiondtech-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3eaf9fcb070105af208cd946e3ded58e793e367b75b85b3d6441fb40f6e2903
MD5 51306121b82714d2c10bc942098360e7
BLAKE2b-256 7beca87b1d519c997caa7a8d9b05b002d8ebbd21a6fd4339fb5c6e3ce58795b4

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