aiondtech 2.0.0__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,473 @@
1
+ Metadata-Version: 2.4
2
+ Name: aiondtech
3
+ Version: 2.1.0
4
+ Summary: Official Python SDK for AiondTech Resume Analyser API
5
+ Author-email: AiondTech <support@aiondtech.com>
6
+ Maintainer-email: AiondTech <support@aiondtech.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://aiondtech.com
9
+ Project-URL: Documentation, https://docs.aiondtech.com
10
+ Project-URL: Repository, https://github.com/aiondtech/aiondtech-python
11
+ Project-URL: Bug Tracker, https://github.com/aiondtech/aiondtech-python/issues
12
+ Project-URL: Changelog, https://github.com/aiondtech/aiondtech-python/blob/main/CHANGELOG.md
13
+ Keywords: aiondtech,resume,cv,parser,analyzer,ats,recruitment,hr,api,sdk
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: requests>=2.25.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
33
+ Requires-Dist: black>=23.0.0; extra == "dev"
34
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # AiondTech Resume Analyser SDK
38
+
39
+ Official Python SDK for the [AiondTech Resume Analyser API](https://aiondtech.com).
40
+
41
+ [![PyPI version](https://badge.fury.io/py/aiondtech.svg)](https://badge.fury.io/py/aiondtech)
42
+ [![Python Versions](https://img.shields.io/pypi/pyversions/aiondtech.svg)](https://pypi.org/project/aiondtech/)
43
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install aiondtech
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ ```python
54
+ from aiondtech import ResumeAnalyser
55
+
56
+ # Initialize client
57
+ client = ResumeAnalyser(api_key="your-api-key")
58
+
59
+ # Or use environment variable
60
+ # export AIONDTECH_API_KEY="your-api-key"
61
+ client = ResumeAnalyser()
62
+
63
+ # Production mode
64
+ client = ResumeAnalyser(api_key="your-api-key", production=True)
65
+ ```
66
+
67
+ ### Constructor Parameters
68
+
69
+ | Parameter | Type | Default | Description |
70
+ |-----------|------|---------|-------------|
71
+ | `api_key` | `str` | `None` | API key (or set `AIONDTECH_API_KEY` env var) |
72
+ | `base_url` | `str` | `None` | Custom API base URL |
73
+ | `timeout` | `int` | `120` | Request timeout in seconds |
74
+ | `production` | `bool` | `False` | Use production URL (`https://api.aiondtech.com`) |
75
+
76
+ ---
77
+
78
+ ## API Endpoints
79
+
80
+ | Method | Credits | Description |
81
+ |--------|---------|-------------|
82
+ | `resumes.upload()` | 1 | Upload PDF resume |
83
+ | `resumes.upload_and_analyze()` | 3 | Upload + AI parsing |
84
+ | `resumes.upload_analyze_compare()` | 6 | Upload + parse + compare to job |
85
+ | `resumes.analyze()` | 2 | Parse existing resume by ID |
86
+ | `resumes.compare_resumes()` | 3 | Compare resume to job |
87
+ | `resumes.list()` | 0 | List all resumes |
88
+ | `jobs.create()` | 1 | Create job posting |
89
+ | `jobs.list()` | 0 | List all jobs |
90
+ | `credits.balance()` | 0 | Check credit balance |
91
+ | `credits.usage()` | 0 | View usage history |
92
+
93
+ ---
94
+
95
+ ## Detailed Usage
96
+
97
+ ### 1. Upload Resume
98
+
99
+ Upload a PDF resume without parsing. Returns a `resume_id` for later use.
100
+
101
+ ```python
102
+ result = client.resumes.upload("path/to/resume.pdf")
103
+ ```
104
+
105
+ **Return type:** `ResumeUploadResult`
106
+
107
+ ```python
108
+ result.resume_id # int — Unique resume ID
109
+ result.message # str — "Resume uploaded successfully"
110
+ result.credits_used # int — 1
111
+ result._raw # dict — Full raw API response
112
+ ```
113
+
114
+ ---
115
+
116
+ ### 2. Upload and Analyze Resume
117
+
118
+ Upload a PDF and immediately extract structured data (AI-powered parsing).
119
+
120
+ ```python
121
+ result = client.resumes.upload_and_analyze("path/to/resume.pdf")
122
+ ```
123
+
124
+ **Return type:** `ResumeAnalysisResult`
125
+
126
+ ```python
127
+ result.resume_id # int — Unique resume ID
128
+ result.parsed_data # dict — Full parsed data (see structure below)
129
+ result.credits_used # int — 3
130
+ result._raw # dict — Full raw API response
131
+
132
+ # Convenience properties
133
+ result.full_name # str | None
134
+ result.email # str | None
135
+ result.skills # list[str]
136
+ result.job_titles # list[str]
137
+ result.total_experience # str | None
138
+ ```
139
+
140
+ **`parsed_data` structure:**
141
+
142
+ ```python
143
+ {
144
+ "full_name": "John Doe",
145
+ "email": "john@example.com",
146
+ "contact_number": "+1234567890",
147
+ "linkedin": "linkedin.com/in/johndoe",
148
+ "location": "New York, NY",
149
+ "skills": ["Python", "Django", "AWS"],
150
+ "job_titles": ["Senior Developer", "Tech Lead"],
151
+ "companies": ["Google", "Meta"],
152
+ "education": ["BSc Computer Science - MIT"],
153
+ "total_experience": "8 years",
154
+ "certifications": ["AWS Certified Solutions Architect"],
155
+ "summary": "Experienced software engineer..."
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ### 3. Upload, Analyze, and Compare
162
+
163
+ Upload a resume, parse it, and compare against a job posting in one call.
164
+
165
+ ```python
166
+ result = client.resumes.upload_analyze_compare("resume.pdf", job_id=42)
167
+ ```
168
+
169
+ **Return type:** `ResumeComparisonResult`
170
+
171
+ ```python
172
+ result.resume_id # int — Resume ID
173
+ result.job_id # int — Job ID compared against
174
+ result.comparison_score # float — Match score (0-100)
175
+ result.comparison_reason # str — Detailed reasoning
176
+ result.language # str | None — Detected language (e.g. "en", "ar")
177
+ result.parsed_data # dict | None — Parsed resume data
178
+ result.credits_used # int — 6
179
+ result._raw # dict — Full raw API response
180
+ ```
181
+
182
+ ---
183
+
184
+ ### 4. Analyze Resume by ID
185
+
186
+ Parse an already-uploaded resume by its ID.
187
+
188
+ ```python
189
+ result = client.resumes.analyze(resume_id=123)
190
+ ```
191
+
192
+ **Return type:** `ParsedResumeResult`
193
+
194
+ ```python
195
+ result.resume_id # int — Resume ID
196
+ result.partner # str — Partner identifier
197
+ result.parsed_data # dict — Full parsed data
198
+ result.credits_used # int — 2
199
+ result._raw # dict — Full raw API response
200
+
201
+ # Convenience properties
202
+ result.full_name # str | None
203
+ result.email # str | None
204
+ result.phone # str | None
205
+ result.linkedin # str | None
206
+ result.location # str | None
207
+ result.skills # list[str]
208
+ result.job_titles # list[str]
209
+ result.companies # list[str]
210
+ result.education # list[str]
211
+ result.total_experience # str | None
212
+ result.certifications # list[str]
213
+ ```
214
+
215
+ ---
216
+
217
+ ### 5. Create Job Posting
218
+
219
+ Create a new job posting to compare resumes against.
220
+
221
+ ```python
222
+ job = client.jobs.create(
223
+ title="Senior Python Developer",
224
+ description="We are looking for an experienced Python developer..."
225
+ )
226
+ ```
227
+
228
+ **Return type:** `JobResult`
229
+
230
+ ```python
231
+ job.job_id # int — Unique job ID
232
+ job.title # str — Job title
233
+ job.description # str — Job description
234
+ job.created_by # str — Creator identifier
235
+ job.created_at # str | None — Creation timestamp
236
+ job.credits_used # int — 1
237
+ job._raw # dict — Full raw API response
238
+ ```
239
+
240
+ ---
241
+
242
+ ### 6. Compare Resume to Job
243
+
244
+ Compare an existing resume against an existing job posting.
245
+
246
+ ```python
247
+ result = client.resumes.compare_resumes(resume_id=123, job_id=456)
248
+ ```
249
+
250
+ **Return type:** `ResumeComparisonResult`
251
+
252
+ ```python
253
+ result.resume_id # int — Resume ID
254
+ result.job_id # int — Job ID
255
+ result.comparison_score # float — Match score (0-100)
256
+ result.comparison_reason # str — Detailed reasoning
257
+ result.language # str | None — Detected language (e.g. "en", "ar")
258
+ result.credits_used # int — 3
259
+ result._raw # dict — Full raw API response
260
+ ```
261
+
262
+ ---
263
+
264
+ ### 7. List Resumes
265
+
266
+ List all uploaded resumes with pagination.
267
+
268
+ ```python
269
+ result = client.resumes.list(page=1, limit=50)
270
+ ```
271
+
272
+ **Return type:** `ResumeListResult`
273
+
274
+ ```python
275
+ result.resumes # list[dict] — List of resume objects
276
+ result.total # int — Total number of resumes
277
+ result.page # int — Current page
278
+ result.limit # int — Items per page
279
+ result.has_more # bool — Whether more pages exist
280
+ result._raw # dict — Full raw API response
281
+
282
+ # Iterable
283
+ for resume in result:
284
+ print(resume["id"], resume.get("full_name"))
285
+
286
+ len(result) # Number of resumes on this page
287
+ ```
288
+
289
+ ---
290
+
291
+ ### 8. List Jobs
292
+
293
+ List all job postings with pagination.
294
+
295
+ ```python
296
+ result = client.jobs.list(page=1, limit=50)
297
+ ```
298
+
299
+ **Return type:** `JobListResult`
300
+
301
+ ```python
302
+ result.jobs # list[dict] — List of job objects
303
+ result.total # int — Total number of jobs
304
+ result.page # int — Current page
305
+ result.limit # int — Items per page
306
+ result.has_more # bool — Whether more pages exist
307
+ result._raw # dict — Full raw API response
308
+
309
+ # Iterable
310
+ for job in result:
311
+ print(job["id"], job["title"])
312
+ ```
313
+
314
+ ---
315
+
316
+ ### 9. Check Credit Balance
317
+
318
+ ```python
319
+ balance = client.credits.balance()
320
+ ```
321
+
322
+ **Returns:** `dict`
323
+
324
+ ```python
325
+ {
326
+ "total": 1000,
327
+ "used_mtd": 150,
328
+ "remaining": 850,
329
+ "plan_name": "Professional",
330
+ "resets_at": "2026-03-01T00:00:00Z"
331
+ }
332
+ ```
333
+
334
+ ---
335
+
336
+ ### 10. Credit Usage History
337
+
338
+ ```python
339
+ usage = client.credits.usage()
340
+ # Or with date filters
341
+ usage = client.credits.usage(start_date="2026-01-01", end_date="2026-01-31")
342
+ ```
343
+
344
+ ---
345
+
346
+ ## Error Handling
347
+
348
+ ```python
349
+ from aiondtech import (
350
+ ResumeAnalyser,
351
+ APIError,
352
+ AuthenticationError,
353
+ InsufficientCreditsError,
354
+ ValidationError,
355
+ NotFoundError,
356
+ RateLimitError,
357
+ )
358
+
359
+ client = ResumeAnalyser(api_key="your-api-key")
360
+
361
+ try:
362
+ result = client.resumes.upload_and_analyze("resume.pdf")
363
+ except AuthenticationError as e:
364
+ print(f"Invalid API key: {e}")
365
+ except InsufficientCreditsError as e:
366
+ print(f"Not enough credits: {e}")
367
+ print(f"Remaining: {e.credits_remaining}")
368
+ print(f"Required: {e.credits_required}")
369
+ except ValidationError as e:
370
+ print(f"Invalid input: {e}")
371
+ except NotFoundError as e:
372
+ print(f"Resource not found: {e}")
373
+ except RateLimitError as e:
374
+ print(f"Rate limited. Retry after: {e.retry_after} seconds")
375
+ except APIError as e:
376
+ print(f"API error [{e.status_code}]: {e.message}")
377
+ ```
378
+
379
+ ---
380
+
381
+ ## Complete Workflow Example
382
+
383
+ ```python
384
+ from aiondtech import ResumeAnalyser
385
+
386
+ client = ResumeAnalyser(api_key="your-api-key")
387
+
388
+ # Step 1: Create a job posting
389
+ job = client.jobs.create(
390
+ title="Senior Python Developer",
391
+ description="5+ years Python, Django, AWS, PostgreSQL required..."
392
+ )
393
+ print(f"Created job #{job.job_id}: {job.title}")
394
+
395
+ # Step 2: Upload and analyze a resume
396
+ analysis = client.resumes.upload_and_analyze("candidate_resume.pdf")
397
+ print(f"Candidate: {analysis.full_name}")
398
+ print(f"Skills: {', '.join(analysis.skills)}")
399
+ print(f"Experience: {analysis.total_experience}")
400
+
401
+ # Step 3: Compare resume to job
402
+ comparison = client.resumes.compare_resumes(
403
+ resume_id=analysis.resume_id,
404
+ job_id=job.job_id
405
+ )
406
+ print(f"Score: {comparison.comparison_score}%")
407
+ print(f"Language: {comparison.language}")
408
+ print(f"Reasoning: {comparison.comparison_reason}")
409
+
410
+ # Step 4: Check remaining credits
411
+ balance = client.credits.balance()
412
+ print(f"Credits remaining: {balance['remaining']}")
413
+ ```
414
+
415
+ ### One-Step Workflow (Upload + Analyze + Compare)
416
+
417
+ ```python
418
+ result = client.resumes.upload_analyze_compare("resume.pdf", job_id=job.job_id)
419
+ print(f"Score: {result.comparison_score}% — {result.comparison_reason}")
420
+ ```
421
+
422
+ ### Batch Processing
423
+
424
+ ```python
425
+ import os
426
+
427
+ job = client.jobs.create("Data Scientist", "ML, Python, statistics...")
428
+
429
+ results = []
430
+ for pdf in os.listdir("resumes/"):
431
+ if pdf.endswith(".pdf"):
432
+ r = client.resumes.upload_analyze_compare(
433
+ f"resumes/{pdf}", job_id=job.job_id
434
+ )
435
+ results.append(r)
436
+ print(f"{r.comparison_score:5.1f}% — {pdf}")
437
+
438
+ # Sort by score
439
+ results.sort(key=lambda x: x.comparison_score, reverse=True)
440
+ print(f"\nTop candidate: resume_id={results[0].resume_id} ({results[0].comparison_score}%)")
441
+ ```
442
+
443
+ ---
444
+
445
+ ## Environment Variables
446
+
447
+ ```bash
448
+ # Set your API key
449
+ export AIONDTECH_API_KEY="your-api-key"
450
+
451
+ # Optional: Custom base URL
452
+ export AIONDTECH_BASE_URL="https://api.aiondtech.com"
453
+ ```
454
+
455
+ ```python
456
+ from aiondtech import ResumeAnalyser
457
+
458
+ # Client automatically uses environment variables
459
+ client = ResumeAnalyser()
460
+ ```
461
+
462
+ ---
463
+
464
+ ## Support
465
+
466
+ - **Documentation**: [https://docs.aiondtech.com](https://docs.aiondtech.com)
467
+ - **API Reference**: [https://api.aiondtech.com/docs](https://api.aiondtech.com/docs)
468
+ - **Email**: support@aiondtech.com
469
+ - **Issues**: [GitHub Issues](https://github.com/aiondtech/aiondtech-python/issues)
470
+
471
+ ## License
472
+
473
+ MIT License - see [LICENSE](LICENSE) for details.