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

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

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 — 1
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 — 3
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 — 6
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 — 2
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 — 1
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.language          # str | None — Detected language (e.g. "en", "ar")
result.credits_used      # int — 3
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}")

# 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}")

# 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}")

# 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}")

Batch Processing

import os

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

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)
        print(f"{r.comparison_score:5.1f}% — {pdf}")

# 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}%)")

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.1.0.tar.gz (18.3 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.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiondtech-2.1.0.tar.gz
Algorithm Hash digest
SHA256 37253e79ceb96207c1b0bdfd973177a38a0202c0fd49c326928a0294f67923f7
MD5 84ee47907c6167176d439a392e033d77
BLAKE2b-256 f7d08360444e6ee17cba2e1f9c8cde4a54502455c79835f1b4a2ef8869d53b7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiondtech-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a2b9851af677b54d6af4486541bc44df7ebc9a6f3be899daf11f107709323fb
MD5 3a0d0008b14788e32a76f2178183f488
BLAKE2b-256 b040ef87099bdcacb4b033fd01f556301d68f4d8575ea9ad15fb76a9d000ab84

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