aiondtech 2.0.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.
- aiondtech-2.0.0/LICENSE +21 -0
- aiondtech-2.0.0/PKG-INFO +285 -0
- aiondtech-2.0.0/README.md +249 -0
- aiondtech-2.0.0/aiondtech/__init__.py +79 -0
- aiondtech-2.0.0/aiondtech/client.py +603 -0
- aiondtech-2.0.0/aiondtech/models.py +428 -0
- aiondtech-2.0.0/aiondtech/py.typed +0 -0
- aiondtech-2.0.0/aiondtech.egg-info/PKG-INFO +285 -0
- aiondtech-2.0.0/aiondtech.egg-info/SOURCES.txt +12 -0
- aiondtech-2.0.0/aiondtech.egg-info/dependency_links.txt +1 -0
- aiondtech-2.0.0/aiondtech.egg-info/requires.txt +7 -0
- aiondtech-2.0.0/aiondtech.egg-info/top_level.txt +1 -0
- aiondtech-2.0.0/pyproject.toml +77 -0
- aiondtech-2.0.0/setup.cfg +4 -0
aiondtech-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AiondTech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
aiondtech-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aiondtech
|
|
3
|
+
Version: 2.0.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
|
+
[](https://badge.fury.io/py/aiondtech)
|
|
42
|
+
[](https://pypi.org/project/aiondtech/)
|
|
43
|
+
[](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
|
+
# Upload a resume (1 credit)
|
|
64
|
+
result = client.resumes.upload("resume.pdf")
|
|
65
|
+
print(f"Resume ID: {result.resume_id}")
|
|
66
|
+
|
|
67
|
+
# Upload and analyze (3 credits)
|
|
68
|
+
analysis = client.resumes.upload_and_analyze("resume.pdf")
|
|
69
|
+
print(f"Name: {analysis.full_name}")
|
|
70
|
+
print(f"Skills: {analysis.skills}")
|
|
71
|
+
|
|
72
|
+
# Create a job posting (1 credit)
|
|
73
|
+
job = client.jobs.create(
|
|
74
|
+
title="Senior Python Developer",
|
|
75
|
+
description="We are looking for an experienced Python developer..."
|
|
76
|
+
)
|
|
77
|
+
print(f"Job ID: {job.job_id}")
|
|
78
|
+
|
|
79
|
+
# Compare resume to job (3 credits)
|
|
80
|
+
comparison = client.matching.compare(
|
|
81
|
+
resume_id=result.resume_id,
|
|
82
|
+
job_id=job.job_id
|
|
83
|
+
)
|
|
84
|
+
print(f"Match Score: {comparison.comparison_score}%")
|
|
85
|
+
print(f"Reason: {comparison.comparison_reason}")
|
|
86
|
+
|
|
87
|
+
# Check credit balance (free)
|
|
88
|
+
balance = client.credits.balance()
|
|
89
|
+
print(f"Remaining: {balance['remaining_credits']}")
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## API Endpoints
|
|
93
|
+
|
|
94
|
+
| Method | Endpoint | Credits | Description |
|
|
95
|
+
|--------|----------|---------|-------------|
|
|
96
|
+
| `resumes.upload()` | POST /external/upload-resume | 1 | Upload PDF |
|
|
97
|
+
| `resumes.upload_and_analyze()` | POST /external/upload-resume-analyze | 3 | Upload + AI parsing |
|
|
98
|
+
| `resumes.upload_analyze_compare()` | POST /external/upload-resume-analyze-compare | 5 | Upload + parse + compare |
|
|
99
|
+
| `resumes.analyze()` | POST /external/analyze-resume-by-id | 2 | Parse existing resume |
|
|
100
|
+
| `resumes.list()` | GET /external/list-resumes | 0 | List all resumes |
|
|
101
|
+
| `jobs.create()` | POST /external/create-job | 1 | Create job posting |
|
|
102
|
+
| `jobs.list()` | GET /external/list-jobs | 0 | List all jobs |
|
|
103
|
+
| `matching.compare()` | POST /external/compare-resumes | 3 | Compare resume to job |
|
|
104
|
+
| `credits.balance()` | GET /external/credits/balance | 0 | Check balance |
|
|
105
|
+
| `credits.usage()` | GET /external/credits/usage | 0 | View history |
|
|
106
|
+
|
|
107
|
+
## Detailed Examples
|
|
108
|
+
|
|
109
|
+
### Upload and Analyze Resume
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from aiondtech import ResumeAnalyser
|
|
113
|
+
|
|
114
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
115
|
+
|
|
116
|
+
# Upload and get structured data
|
|
117
|
+
analysis = client.resumes.upload_and_analyze("john_doe_resume.pdf")
|
|
118
|
+
|
|
119
|
+
print(f"Name: {analysis.full_name}")
|
|
120
|
+
print(f"Email: {analysis.email}")
|
|
121
|
+
print(f"Skills: {', '.join(analysis.skills)}")
|
|
122
|
+
print(f"Experience: {analysis.total_experience}")
|
|
123
|
+
print(f"Job Titles: {', '.join(analysis.job_titles)}")
|
|
124
|
+
|
|
125
|
+
# Access raw parsed data
|
|
126
|
+
print(analysis.parsed_data)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Full Recruitment Workflow
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from aiondtech import ResumeAnalyser
|
|
133
|
+
|
|
134
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
135
|
+
|
|
136
|
+
# 1. Create a job posting
|
|
137
|
+
job = client.jobs.create(
|
|
138
|
+
title="Senior Python Developer",
|
|
139
|
+
description="""
|
|
140
|
+
Requirements:
|
|
141
|
+
- 5+ years Python experience
|
|
142
|
+
- FastAPI or Django expertise
|
|
143
|
+
- PostgreSQL knowledge
|
|
144
|
+
- AWS experience preferred
|
|
145
|
+
"""
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
# 2. Upload and compare multiple resumes
|
|
149
|
+
resumes = ["candidate1.pdf", "candidate2.pdf", "candidate3.pdf"]
|
|
150
|
+
results = []
|
|
151
|
+
|
|
152
|
+
for resume_path in resumes:
|
|
153
|
+
result = client.resumes.upload_analyze_compare(
|
|
154
|
+
file_path=resume_path,
|
|
155
|
+
job_id=job.job_id
|
|
156
|
+
)
|
|
157
|
+
results.append({
|
|
158
|
+
"resume_id": result.resume_id,
|
|
159
|
+
"name": result.parsed_data.get("full_name"),
|
|
160
|
+
"score": result.comparison_score,
|
|
161
|
+
"matched": result.matched_keywords,
|
|
162
|
+
"missing": result.missing_keywords
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
# 3. Rank candidates by score
|
|
166
|
+
ranked = sorted(results, key=lambda x: x["score"], reverse=True)
|
|
167
|
+
|
|
168
|
+
for i, candidate in enumerate(ranked, 1):
|
|
169
|
+
print(f"{i}. {candidate['name']} - {candidate['score']}% match")
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Error Handling
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from aiondtech import (
|
|
176
|
+
ResumeAnalyser,
|
|
177
|
+
AuthenticationError,
|
|
178
|
+
RateLimitError,
|
|
179
|
+
InsufficientCreditsError,
|
|
180
|
+
ValidationError,
|
|
181
|
+
NotFoundError,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
185
|
+
|
|
186
|
+
try:
|
|
187
|
+
result = client.resumes.upload_and_analyze("resume.pdf")
|
|
188
|
+
except AuthenticationError:
|
|
189
|
+
print("Invalid API key")
|
|
190
|
+
except InsufficientCreditsError as e:
|
|
191
|
+
print(f"Not enough credits. Remaining: {e.credits_remaining}")
|
|
192
|
+
except RateLimitError as e:
|
|
193
|
+
print(f"Rate limited. Retry after {e.retry_after} seconds")
|
|
194
|
+
except ValidationError as e:
|
|
195
|
+
print(f"Invalid input: {e.message}")
|
|
196
|
+
except NotFoundError:
|
|
197
|
+
print("Resource not found")
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Using Environment Variables
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Set your API key
|
|
204
|
+
export AIONDTECH_API_KEY="your-api-key"
|
|
205
|
+
|
|
206
|
+
# Optional: Use production URL
|
|
207
|
+
export AIONDTECH_BASE_URL="https://api.aiondtech.com"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
from aiondtech import ResumeAnalyser
|
|
212
|
+
|
|
213
|
+
# Client automatically uses environment variables
|
|
214
|
+
client = ResumeAnalyser()
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Production vs Development
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
from aiondtech import ResumeAnalyser
|
|
221
|
+
|
|
222
|
+
# Development (default)
|
|
223
|
+
client = ResumeAnalyser(api_key="your-key")
|
|
224
|
+
# Uses: https://api.dev.aiondtech.com
|
|
225
|
+
|
|
226
|
+
# Production
|
|
227
|
+
client = ResumeAnalyser(api_key="your-key", production=True)
|
|
228
|
+
# Uses: https://api.aiondtech.com
|
|
229
|
+
|
|
230
|
+
# Custom URL
|
|
231
|
+
client = ResumeAnalyser(api_key="your-key", base_url="https://custom.api.com")
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Response Models
|
|
235
|
+
|
|
236
|
+
All API responses are converted to typed Python objects:
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
# ResumeUploadResult
|
|
240
|
+
result.resume_id # int
|
|
241
|
+
result.message # str
|
|
242
|
+
result.credits_used # int
|
|
243
|
+
|
|
244
|
+
# ResumeAnalysisResult
|
|
245
|
+
analysis.resume_id # int
|
|
246
|
+
analysis.parsed_data # dict
|
|
247
|
+
analysis.full_name # str (shortcut)
|
|
248
|
+
analysis.email # str (shortcut)
|
|
249
|
+
analysis.skills # List[str] (shortcut)
|
|
250
|
+
|
|
251
|
+
# ResumeComparisonResult
|
|
252
|
+
comparison.resume_id # int
|
|
253
|
+
comparison.job_id # int
|
|
254
|
+
comparison.comparison_score # float (0-100)
|
|
255
|
+
comparison.comparison_reason # str
|
|
256
|
+
comparison.matched_keywords # List[str]
|
|
257
|
+
comparison.missing_keywords # List[str]
|
|
258
|
+
comparison.is_good_match # bool (score >= 70)
|
|
259
|
+
comparison.match_level # str ("excellent", "good", "fair", "poor")
|
|
260
|
+
|
|
261
|
+
# JobResult
|
|
262
|
+
job.job_id # int
|
|
263
|
+
job.title # str
|
|
264
|
+
job.description # str
|
|
265
|
+
job.created_at # str
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Rate Limits
|
|
269
|
+
|
|
270
|
+
| Tier | Per Minute | Per Day |
|
|
271
|
+
|------|------------|---------|
|
|
272
|
+
| Starter | 50 | 500 |
|
|
273
|
+
| Growth | 100 | 1,000 |
|
|
274
|
+
| Enterprise | 500 | Unlimited |
|
|
275
|
+
|
|
276
|
+
## Support
|
|
277
|
+
|
|
278
|
+
- **Documentation**: [https://docs.aiondtech.com](https://docs.aiondtech.com)
|
|
279
|
+
- **API Reference**: [https://api.aiondtech.com/docs](https://api.aiondtech.com/docs)
|
|
280
|
+
- **Email**: support@aiondtech.com
|
|
281
|
+
- **Issues**: [GitHub Issues](https://github.com/aiondtech/aiondtech-python/issues)
|
|
282
|
+
|
|
283
|
+
## License
|
|
284
|
+
|
|
285
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# AiondTech Resume Analyser SDK
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [AiondTech Resume Analyser API](https://aiondtech.com).
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/py/aiondtech)
|
|
6
|
+
[](https://pypi.org/project/aiondtech/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install aiondtech
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from aiondtech import ResumeAnalyser
|
|
19
|
+
|
|
20
|
+
# Initialize client
|
|
21
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
22
|
+
|
|
23
|
+
# Or use environment variable
|
|
24
|
+
# export AIONDTECH_API_KEY="your-api-key"
|
|
25
|
+
client = ResumeAnalyser()
|
|
26
|
+
|
|
27
|
+
# Upload a resume (1 credit)
|
|
28
|
+
result = client.resumes.upload("resume.pdf")
|
|
29
|
+
print(f"Resume ID: {result.resume_id}")
|
|
30
|
+
|
|
31
|
+
# Upload and analyze (3 credits)
|
|
32
|
+
analysis = client.resumes.upload_and_analyze("resume.pdf")
|
|
33
|
+
print(f"Name: {analysis.full_name}")
|
|
34
|
+
print(f"Skills: {analysis.skills}")
|
|
35
|
+
|
|
36
|
+
# Create a job posting (1 credit)
|
|
37
|
+
job = client.jobs.create(
|
|
38
|
+
title="Senior Python Developer",
|
|
39
|
+
description="We are looking for an experienced Python developer..."
|
|
40
|
+
)
|
|
41
|
+
print(f"Job ID: {job.job_id}")
|
|
42
|
+
|
|
43
|
+
# Compare resume to job (3 credits)
|
|
44
|
+
comparison = client.matching.compare(
|
|
45
|
+
resume_id=result.resume_id,
|
|
46
|
+
job_id=job.job_id
|
|
47
|
+
)
|
|
48
|
+
print(f"Match Score: {comparison.comparison_score}%")
|
|
49
|
+
print(f"Reason: {comparison.comparison_reason}")
|
|
50
|
+
|
|
51
|
+
# Check credit balance (free)
|
|
52
|
+
balance = client.credits.balance()
|
|
53
|
+
print(f"Remaining: {balance['remaining_credits']}")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## API Endpoints
|
|
57
|
+
|
|
58
|
+
| Method | Endpoint | Credits | Description |
|
|
59
|
+
|--------|----------|---------|-------------|
|
|
60
|
+
| `resumes.upload()` | POST /external/upload-resume | 1 | Upload PDF |
|
|
61
|
+
| `resumes.upload_and_analyze()` | POST /external/upload-resume-analyze | 3 | Upload + AI parsing |
|
|
62
|
+
| `resumes.upload_analyze_compare()` | POST /external/upload-resume-analyze-compare | 5 | Upload + parse + compare |
|
|
63
|
+
| `resumes.analyze()` | POST /external/analyze-resume-by-id | 2 | Parse existing resume |
|
|
64
|
+
| `resumes.list()` | GET /external/list-resumes | 0 | List all resumes |
|
|
65
|
+
| `jobs.create()` | POST /external/create-job | 1 | Create job posting |
|
|
66
|
+
| `jobs.list()` | GET /external/list-jobs | 0 | List all jobs |
|
|
67
|
+
| `matching.compare()` | POST /external/compare-resumes | 3 | Compare resume to job |
|
|
68
|
+
| `credits.balance()` | GET /external/credits/balance | 0 | Check balance |
|
|
69
|
+
| `credits.usage()` | GET /external/credits/usage | 0 | View history |
|
|
70
|
+
|
|
71
|
+
## Detailed Examples
|
|
72
|
+
|
|
73
|
+
### Upload and Analyze Resume
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from aiondtech import ResumeAnalyser
|
|
77
|
+
|
|
78
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
79
|
+
|
|
80
|
+
# Upload and get structured data
|
|
81
|
+
analysis = client.resumes.upload_and_analyze("john_doe_resume.pdf")
|
|
82
|
+
|
|
83
|
+
print(f"Name: {analysis.full_name}")
|
|
84
|
+
print(f"Email: {analysis.email}")
|
|
85
|
+
print(f"Skills: {', '.join(analysis.skills)}")
|
|
86
|
+
print(f"Experience: {analysis.total_experience}")
|
|
87
|
+
print(f"Job Titles: {', '.join(analysis.job_titles)}")
|
|
88
|
+
|
|
89
|
+
# Access raw parsed data
|
|
90
|
+
print(analysis.parsed_data)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Full Recruitment Workflow
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from aiondtech import ResumeAnalyser
|
|
97
|
+
|
|
98
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
99
|
+
|
|
100
|
+
# 1. Create a job posting
|
|
101
|
+
job = client.jobs.create(
|
|
102
|
+
title="Senior Python Developer",
|
|
103
|
+
description="""
|
|
104
|
+
Requirements:
|
|
105
|
+
- 5+ years Python experience
|
|
106
|
+
- FastAPI or Django expertise
|
|
107
|
+
- PostgreSQL knowledge
|
|
108
|
+
- AWS experience preferred
|
|
109
|
+
"""
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# 2. Upload and compare multiple resumes
|
|
113
|
+
resumes = ["candidate1.pdf", "candidate2.pdf", "candidate3.pdf"]
|
|
114
|
+
results = []
|
|
115
|
+
|
|
116
|
+
for resume_path in resumes:
|
|
117
|
+
result = client.resumes.upload_analyze_compare(
|
|
118
|
+
file_path=resume_path,
|
|
119
|
+
job_id=job.job_id
|
|
120
|
+
)
|
|
121
|
+
results.append({
|
|
122
|
+
"resume_id": result.resume_id,
|
|
123
|
+
"name": result.parsed_data.get("full_name"),
|
|
124
|
+
"score": result.comparison_score,
|
|
125
|
+
"matched": result.matched_keywords,
|
|
126
|
+
"missing": result.missing_keywords
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
# 3. Rank candidates by score
|
|
130
|
+
ranked = sorted(results, key=lambda x: x["score"], reverse=True)
|
|
131
|
+
|
|
132
|
+
for i, candidate in enumerate(ranked, 1):
|
|
133
|
+
print(f"{i}. {candidate['name']} - {candidate['score']}% match")
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Error Handling
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
from aiondtech import (
|
|
140
|
+
ResumeAnalyser,
|
|
141
|
+
AuthenticationError,
|
|
142
|
+
RateLimitError,
|
|
143
|
+
InsufficientCreditsError,
|
|
144
|
+
ValidationError,
|
|
145
|
+
NotFoundError,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
149
|
+
|
|
150
|
+
try:
|
|
151
|
+
result = client.resumes.upload_and_analyze("resume.pdf")
|
|
152
|
+
except AuthenticationError:
|
|
153
|
+
print("Invalid API key")
|
|
154
|
+
except InsufficientCreditsError as e:
|
|
155
|
+
print(f"Not enough credits. Remaining: {e.credits_remaining}")
|
|
156
|
+
except RateLimitError as e:
|
|
157
|
+
print(f"Rate limited. Retry after {e.retry_after} seconds")
|
|
158
|
+
except ValidationError as e:
|
|
159
|
+
print(f"Invalid input: {e.message}")
|
|
160
|
+
except NotFoundError:
|
|
161
|
+
print("Resource not found")
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Using Environment Variables
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Set your API key
|
|
168
|
+
export AIONDTECH_API_KEY="your-api-key"
|
|
169
|
+
|
|
170
|
+
# Optional: Use production URL
|
|
171
|
+
export AIONDTECH_BASE_URL="https://api.aiondtech.com"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from aiondtech import ResumeAnalyser
|
|
176
|
+
|
|
177
|
+
# Client automatically uses environment variables
|
|
178
|
+
client = ResumeAnalyser()
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Production vs Development
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from aiondtech import ResumeAnalyser
|
|
185
|
+
|
|
186
|
+
# Development (default)
|
|
187
|
+
client = ResumeAnalyser(api_key="your-key")
|
|
188
|
+
# Uses: https://api.dev.aiondtech.com
|
|
189
|
+
|
|
190
|
+
# Production
|
|
191
|
+
client = ResumeAnalyser(api_key="your-key", production=True)
|
|
192
|
+
# Uses: https://api.aiondtech.com
|
|
193
|
+
|
|
194
|
+
# Custom URL
|
|
195
|
+
client = ResumeAnalyser(api_key="your-key", base_url="https://custom.api.com")
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Response Models
|
|
199
|
+
|
|
200
|
+
All API responses are converted to typed Python objects:
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
# ResumeUploadResult
|
|
204
|
+
result.resume_id # int
|
|
205
|
+
result.message # str
|
|
206
|
+
result.credits_used # int
|
|
207
|
+
|
|
208
|
+
# ResumeAnalysisResult
|
|
209
|
+
analysis.resume_id # int
|
|
210
|
+
analysis.parsed_data # dict
|
|
211
|
+
analysis.full_name # str (shortcut)
|
|
212
|
+
analysis.email # str (shortcut)
|
|
213
|
+
analysis.skills # List[str] (shortcut)
|
|
214
|
+
|
|
215
|
+
# ResumeComparisonResult
|
|
216
|
+
comparison.resume_id # int
|
|
217
|
+
comparison.job_id # int
|
|
218
|
+
comparison.comparison_score # float (0-100)
|
|
219
|
+
comparison.comparison_reason # str
|
|
220
|
+
comparison.matched_keywords # List[str]
|
|
221
|
+
comparison.missing_keywords # List[str]
|
|
222
|
+
comparison.is_good_match # bool (score >= 70)
|
|
223
|
+
comparison.match_level # str ("excellent", "good", "fair", "poor")
|
|
224
|
+
|
|
225
|
+
# JobResult
|
|
226
|
+
job.job_id # int
|
|
227
|
+
job.title # str
|
|
228
|
+
job.description # str
|
|
229
|
+
job.created_at # str
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Rate Limits
|
|
233
|
+
|
|
234
|
+
| Tier | Per Minute | Per Day |
|
|
235
|
+
|------|------------|---------|
|
|
236
|
+
| Starter | 50 | 500 |
|
|
237
|
+
| Growth | 100 | 1,000 |
|
|
238
|
+
| Enterprise | 500 | Unlimited |
|
|
239
|
+
|
|
240
|
+
## Support
|
|
241
|
+
|
|
242
|
+
- **Documentation**: [https://docs.aiondtech.com](https://docs.aiondtech.com)
|
|
243
|
+
- **API Reference**: [https://api.aiondtech.com/docs](https://api.aiondtech.com/docs)
|
|
244
|
+
- **Email**: support@aiondtech.com
|
|
245
|
+
- **Issues**: [GitHub Issues](https://github.com/aiondtech/aiondtech-python/issues)
|
|
246
|
+
|
|
247
|
+
## License
|
|
248
|
+
|
|
249
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AiondTech Resume Analyser API - Python SDK v2.0
|
|
3
|
+
|
|
4
|
+
A Python client library for the AiondTech Resume Analyser API.
|
|
5
|
+
Provides resume parsing, analysis, and job matching capabilities.
|
|
6
|
+
|
|
7
|
+
Quick Start:
|
|
8
|
+
from aiondtech import ResumeAnalyser
|
|
9
|
+
|
|
10
|
+
client = ResumeAnalyser(api_key="your-api-key")
|
|
11
|
+
|
|
12
|
+
# Upload a resume
|
|
13
|
+
result = client.resumes.upload("resume.pdf")
|
|
14
|
+
print(f"Resume ID: {result.resume_id}")
|
|
15
|
+
|
|
16
|
+
# Upload and analyze
|
|
17
|
+
analysis = client.resumes.upload_and_analyze("resume.pdf")
|
|
18
|
+
print(f"Name: {analysis.full_name}")
|
|
19
|
+
print(f"Skills: {analysis.skills}")
|
|
20
|
+
|
|
21
|
+
# Create job and compare
|
|
22
|
+
job = client.jobs.create("Developer", "Python required...")
|
|
23
|
+
comparison = client.matching.compare(
|
|
24
|
+
resume_id=result.resume_id,
|
|
25
|
+
job_id=job.job_id
|
|
26
|
+
)
|
|
27
|
+
print(f"Match Score: {comparison.comparison_score}%")
|
|
28
|
+
|
|
29
|
+
Environment Variables:
|
|
30
|
+
AIONDTECH_API_KEY: Your API key
|
|
31
|
+
AIONDTECH_BASE_URL: Custom API URL (default: https://api.dev.aiondtech.com)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
__version__ = "2.0.0"
|
|
35
|
+
__author__ = "AiondTech"
|
|
36
|
+
|
|
37
|
+
from .client import ResumeAnalyser, Client
|
|
38
|
+
from .models import (
|
|
39
|
+
# Response models
|
|
40
|
+
ResumeUploadResult,
|
|
41
|
+
ResumeAnalysisResult,
|
|
42
|
+
ResumeComparisonResult,
|
|
43
|
+
JobResult,
|
|
44
|
+
ParsedResumeResult,
|
|
45
|
+
ResumeListResult,
|
|
46
|
+
JobListResult,
|
|
47
|
+
CreditBalance,
|
|
48
|
+
# Exceptions
|
|
49
|
+
APIError,
|
|
50
|
+
AuthenticationError,
|
|
51
|
+
RateLimitError,
|
|
52
|
+
ValidationError,
|
|
53
|
+
NotFoundError,
|
|
54
|
+
InsufficientCreditsError,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
__all__ = [
|
|
58
|
+
# Client
|
|
59
|
+
"ResumeAnalyser",
|
|
60
|
+
"Client",
|
|
61
|
+
# Response models
|
|
62
|
+
"ResumeUploadResult",
|
|
63
|
+
"ResumeAnalysisResult",
|
|
64
|
+
"ResumeComparisonResult",
|
|
65
|
+
"JobResult",
|
|
66
|
+
"ParsedResumeResult",
|
|
67
|
+
"ResumeListResult",
|
|
68
|
+
"JobListResult",
|
|
69
|
+
"CreditBalance",
|
|
70
|
+
# Exceptions
|
|
71
|
+
"APIError",
|
|
72
|
+
"AuthenticationError",
|
|
73
|
+
"RateLimitError",
|
|
74
|
+
"ValidationError",
|
|
75
|
+
"NotFoundError",
|
|
76
|
+
"InsufficientCreditsError",
|
|
77
|
+
# Version
|
|
78
|
+
"__version__",
|
|
79
|
+
]
|