sharpapi-python-client 1.0.1__tar.gz → 1.2.1__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.
- sharpapi_python_client-1.2.1/PKG-INFO +337 -0
- sharpapi_python_client-1.2.1/README.md +317 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/pyproject.toml +3 -3
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/sharp_api_service.py +1 -1
- sharpapi_python_client-1.0.1/PKG-INFO +0 -103
- sharpapi_python_client-1.0.1/README.md +0 -81
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/LICENSE +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/__init__.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/dto/__init__.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/dto/job_description_parameters.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/dto/sharp_api_job.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/dto/sharp_api_subscription_info.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/__init__.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/sharp_api_job_status_enum.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/sharp_api_job_type_enum.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/sharp_api_languages.py +0 -0
- {sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/sharp_api_voice_tone.py +0 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: sharpapi-python-client
|
|
3
|
+
Version: 1.2.1
|
|
4
|
+
Summary: SharpAPI.com Python SDK Client - AI-Powered Workflow Automation API.
|
|
5
|
+
Home-page: https://sharpapi.com
|
|
6
|
+
License: MIT
|
|
7
|
+
Author: Dawid Makowski
|
|
8
|
+
Author-email: contact@sharpapi.com
|
|
9
|
+
Requires-Python: >=3.10,<4.0
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Dist: requests (>=2.33.0)
|
|
16
|
+
Project-URL: Documentation, https://sharpapi.com/documentation
|
|
17
|
+
Project-URL: Repository, https://github.com/sharpapi/sharpapi-python-client
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
# SharpAPI Python Client SDK
|
|
23
|
+
|
|
24
|
+
🚀 **Automate Workflows with AI-Powered API**
|
|
25
|
+
|
|
26
|
+
## Leverage AI API to Streamline Workflows in E-Commerce, Marketing, Content Management, HR Tech, Travel, and More.
|
|
27
|
+
|
|
28
|
+
[](https://pypi.org/project/sharpapi-python-client/)
|
|
29
|
+
[](https://github.com/sharpapi/sharpapi-python-client/blob/main/LICENSE)
|
|
30
|
+
[](https://pypi.org/project/sharpapi-python-client/)
|
|
31
|
+
[](https://www.python.org/downloads/)
|
|
32
|
+
|
|
33
|
+
#### Save time on repetitive content analysis and generation tasks that your app users perform daily.
|
|
34
|
+
**SharpAPI Python Client SDK** enables developers to integrate advanced artificial intelligence capabilities into their Python applications. This SDK simplifies interaction with the SharpAPI services, providing a seamless way to leverage AI for various use cases.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
Visit the [SharpAPI.com Website »](https://sharpapi.com/) for more information.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 📚 Table of Contents
|
|
42
|
+
|
|
43
|
+
- [📦 Installation](#-installation)
|
|
44
|
+
- [🔧 Configuration](#-configuration)
|
|
45
|
+
- [💡 Features](#-features)
|
|
46
|
+
- [💻 Usage](#-usage)
|
|
47
|
+
- [🧪 Testing](#-testing)
|
|
48
|
+
- [🤝 Contributing](#-contributing)
|
|
49
|
+
- [📄 License](#-license)
|
|
50
|
+
- [📞 Contact](#-contact)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 📦 Installation
|
|
55
|
+
|
|
56
|
+
You can install the SharpAPI Python Client SDK via **PyPI** using `pip`:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install sharpapi-python-client
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Alternatively, if you prefer using **Poetry** for dependency management, you can add it to your project:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
poetry add sharpapi-python-client
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🔧 Configuration
|
|
71
|
+
|
|
72
|
+
### 1. **Obtain Your SharpAPI API Key**
|
|
73
|
+
|
|
74
|
+
Sign up at [SharpAPI.com](https://sharpapi.com/) to obtain your API key.
|
|
75
|
+
|
|
76
|
+
### 2. **Set Up Environment Variables**
|
|
77
|
+
|
|
78
|
+
Create a `.env` file in your project's root directory to securely store your API key:
|
|
79
|
+
|
|
80
|
+
```env
|
|
81
|
+
SHARP_API_KEY=your_sharpapi_api_key_here
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Ensure that `.env` is included in your `.gitignore` to prevent accidental exposure of your API key.
|
|
85
|
+
|
|
86
|
+
### 3. **Loading Environment Variables**
|
|
87
|
+
|
|
88
|
+
The SDK uses `python-dotenv` to load environment variables. Ensure that your application initializes the environment variables before using the SDK:
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
from dotenv import load_dotenv
|
|
92
|
+
|
|
93
|
+
load_dotenv() # Loads environment variables from .env file
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 💡 Features
|
|
99
|
+
|
|
100
|
+
The **SharpAPI Python Client SDK** offers a comprehensive suite of AI-powered tools to enhance various aspects of your applications:
|
|
101
|
+
|
|
102
|
+
### **E-Commerce**
|
|
103
|
+
- **Generate Engaging Product Introductions**
|
|
104
|
+
- **Create Personalized Thank-You Emails**
|
|
105
|
+
- **Streamline Product Categorization**
|
|
106
|
+
- **Perform Sentiment Analysis on Product Reviews**
|
|
107
|
+
|
|
108
|
+
### **Content & Marketing Automation**
|
|
109
|
+
- **Translate Text for a Global Audience**
|
|
110
|
+
- **Paraphrase and Proofread Any Text**
|
|
111
|
+
- **Detect Spam Content**
|
|
112
|
+
- **Extract Contact Information**
|
|
113
|
+
- **Summarize Content and Generate Keywords/Tags**
|
|
114
|
+
- **Generate SEO Meta Tags**
|
|
115
|
+
|
|
116
|
+
### **HR Tech**
|
|
117
|
+
- **Generate Job Descriptions**
|
|
118
|
+
- **Identify Related Job Positions and Skills**
|
|
119
|
+
- **Parse and Extract Information from Resumes**
|
|
120
|
+
|
|
121
|
+
### **Travel, Tourism & Hospitality**
|
|
122
|
+
- **Analyze Sentiment in Travel Reviews**
|
|
123
|
+
- **Categorize Tours, Activities, and Hospitality Products**
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 💻 Usage
|
|
128
|
+
|
|
129
|
+
### 🛠 **Basic Example**
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from sharpapi import SharpApiService
|
|
133
|
+
|
|
134
|
+
# Initialize the SharpApiService with your API key
|
|
135
|
+
sharp_api = SharpApiService(api_key='YOUR_SHARP_API_KEY')
|
|
136
|
+
|
|
137
|
+
try:
|
|
138
|
+
# Example: Generate Product Categories
|
|
139
|
+
status_url = sharp_api.product_categories(
|
|
140
|
+
product_name='Lenovo Chromebook Laptop (2023), 14" FHD Touchscreen Slim 3, 8-Core MediaTek Kompanio 520 CPU, 4GB RAM, 128GB Storage',
|
|
141
|
+
language='German', # Optional
|
|
142
|
+
max_quantity=400, # Optional
|
|
143
|
+
voice_tone='Neutral', # Optional
|
|
144
|
+
context='Optional current e-store categories' # Optional
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Fetch and print the results
|
|
148
|
+
result_sharp_api_job = sharp_api.fetch_results(status_url)
|
|
149
|
+
print(result_sharp_api_job.get_result_json())
|
|
150
|
+
except Exception as e:
|
|
151
|
+
print(f"An error occurred: {e}")
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 🛠 **Advanced Example: Parsing a Resume**
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from sharpapi import SharpApiService
|
|
158
|
+
|
|
159
|
+
# Initialize the SharpApiService with your API key
|
|
160
|
+
sharp_api = SharpApiService(api_key='YOUR_SHARP_API_KEY')
|
|
161
|
+
|
|
162
|
+
try:
|
|
163
|
+
# Parse Resume
|
|
164
|
+
status_url = sharp_api.parse_resume(
|
|
165
|
+
file_path='path/to/sample_resume.pdf',
|
|
166
|
+
language='English' # Optional
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Fetch and print the parsed resume data
|
|
170
|
+
parsed_resume = sharp_api.fetch_results(status_url)
|
|
171
|
+
print(parsed_resume.get_result_json())
|
|
172
|
+
except Exception as e:
|
|
173
|
+
print(f"An error occurred: {e}")
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🧪 Testing
|
|
179
|
+
|
|
180
|
+
This project uses Python's built-in `unittest` framework for testing.
|
|
181
|
+
|
|
182
|
+
### **Running Tests**
|
|
183
|
+
|
|
184
|
+
Ensure that you are in the project's root directory and that all dependencies are installed via Poetry or `pip`.
|
|
185
|
+
|
|
186
|
+
#### **Using Poetry:**
|
|
187
|
+
|
|
188
|
+
1. **Activate Poetry Shell:**
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
poetry shell
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
2. **Run Tests:**
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
python -m unittest discover tests
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### **Using pip and Virtual Environment:**
|
|
201
|
+
|
|
202
|
+
1. **Activate Your Virtual Environment:**
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
2. **Run Tests:**
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
python -m unittest discover tests
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### **Key Components:**
|
|
217
|
+
|
|
218
|
+
- **`src/sharpapi/`**: Contains the main SDK code.
|
|
219
|
+
- **`dto/`**: Data Transfer Objects for handling request and response data.
|
|
220
|
+
- **`enums/`**: Enumerations for standardized values across the SDK.
|
|
221
|
+
- **`sharp_api_service.py`**: Core service class to interact with SharpAPI endpoints.
|
|
222
|
+
- **`tests/`**: Contains unit tests for the SDK using Python's `unittest` framework.
|
|
223
|
+
- **`pyproject.toml`**: Configuration file managed by Poetry for dependencies and packaging.
|
|
224
|
+
- **`LICENSE`**: Licensing information.
|
|
225
|
+
- **`README.md`**: Project documentation.
|
|
226
|
+
- **`venv/`**: Virtual environment directory (should be excluded from version control).
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 🤝 Contributing
|
|
231
|
+
|
|
232
|
+
Contributions are welcome! Whether you're reporting a bug, suggesting an enhancement, or submitting a pull request, your input is valuable to us.
|
|
233
|
+
|
|
234
|
+
### **How to Contribute:**
|
|
235
|
+
|
|
236
|
+
1. **Fork the Repository**
|
|
237
|
+
|
|
238
|
+
Click the [Fork](https://github.com/sharpapi/sharpapi-python-client/fork) button at the top-right corner of the repository page.
|
|
239
|
+
|
|
240
|
+
2. **Clone Your Fork**
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
git clone https://github.com/yourusername/sharpapi-python-client.git
|
|
244
|
+
cd sharpapi-python-client
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
3. **Create a New Branch**
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
git checkout -b feature/YourFeatureName
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
4. **Make Your Changes**
|
|
254
|
+
|
|
255
|
+
Implement your feature or fix. Ensure that your code adheres to the project's coding standards.
|
|
256
|
+
|
|
257
|
+
5. **Run Tests**
|
|
258
|
+
|
|
259
|
+
Ensure all tests pass before committing your changes.
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
poetry shell
|
|
263
|
+
python -m unittest discover tests
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
6. **Commit Your Changes**
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
git commit -m "Add feature XYZ"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
7. **Push to Your Fork**
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
git push origin feature/YourFeatureName
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
8. **Create a Pull Request**
|
|
279
|
+
|
|
280
|
+
Navigate to the original repository and click on "Compare & pull request." Provide a clear description of your changes.
|
|
281
|
+
|
|
282
|
+
### **Coding Standards:**
|
|
283
|
+
|
|
284
|
+
- Follow [PEP 8](https://pep8.org/) style guidelines.
|
|
285
|
+
- Write clear and concise docstrings for all modules, classes, and methods.
|
|
286
|
+
- Ensure that all new features are accompanied by corresponding unit tests.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 📄 License
|
|
291
|
+
|
|
292
|
+
This project is licensed under the [MIT License](https://github.com/sharpapi/sharpapi-python-client/blob/main/LICENSE).
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## 📞 Contact
|
|
297
|
+
|
|
298
|
+
For any questions, support, or inquiries, feel free to reach out:
|
|
299
|
+
|
|
300
|
+
- **Email**: [contact@sharpapi.com](mailto:contact@sharpapi.com)
|
|
301
|
+
- **Website**: [https://sharpapi.com](https://sharpapi.com/)
|
|
302
|
+
- **GitHub**: [https://github.com/sharpapi/sharpapi-python-client](https://github.com/sharpapi/sharpapi-python-client)
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 📝 Changelog
|
|
307
|
+
|
|
308
|
+
Please see [CHANGELOG.md](https://github.com/sharpapi/sharpapi-python-client/blob/main/CHANGELOG.md) for more information on what has changed recently.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## 📚 Documentation
|
|
313
|
+
|
|
314
|
+
For detailed usage and API methods, please refer to the [SharpAPI Documentation](https://sharpapi.com/documentation).
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 🧰 Additional Resources
|
|
319
|
+
|
|
320
|
+
- **Poetry Documentation**: [https://python-poetry.org/docs/](https://python-poetry.org/docs/)
|
|
321
|
+
- **Python `unittest` Documentation**: [https://docs.python.org/3/library/unittest.html](https://docs.python.org/3/library/unittest.html)
|
|
322
|
+
- **SharpAPI Documentation**: [https://sharpapi.com/documentation](https://sharpapi.com/documentation)
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
## Social Media
|
|
326
|
+
|
|
327
|
+
🚀 For the latest news, tutorials, and case studies, don't forget to follow us on:
|
|
328
|
+
- [SharpAPI X (formerly Twitter)](https://x.com/SharpAPI)
|
|
329
|
+
- [SharpAPI YouTube](https://www.youtube.com/@SharpAPI)
|
|
330
|
+
- [SharpAPI Vimeo](https://vimeo.com/SharpAPI)
|
|
331
|
+
- [SharpAPI LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)
|
|
332
|
+
- [SharpAPI Facebook](https://www.facebook.com/profile.php?id=61554115896974)
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
Happy Coding! 🚀
|
|
337
|
+
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# SharpAPI Python Client SDK
|
|
4
|
+
|
|
5
|
+
🚀 **Automate Workflows with AI-Powered API**
|
|
6
|
+
|
|
7
|
+
## Leverage AI API to Streamline Workflows in E-Commerce, Marketing, Content Management, HR Tech, Travel, and More.
|
|
8
|
+
|
|
9
|
+
[](https://pypi.org/project/sharpapi-python-client/)
|
|
10
|
+
[](https://github.com/sharpapi/sharpapi-python-client/blob/main/LICENSE)
|
|
11
|
+
[](https://pypi.org/project/sharpapi-python-client/)
|
|
12
|
+
[](https://www.python.org/downloads/)
|
|
13
|
+
|
|
14
|
+
#### Save time on repetitive content analysis and generation tasks that your app users perform daily.
|
|
15
|
+
**SharpAPI Python Client SDK** enables developers to integrate advanced artificial intelligence capabilities into their Python applications. This SDK simplifies interaction with the SharpAPI services, providing a seamless way to leverage AI for various use cases.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Visit the [SharpAPI.com Website »](https://sharpapi.com/) for more information.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 📚 Table of Contents
|
|
23
|
+
|
|
24
|
+
- [📦 Installation](#-installation)
|
|
25
|
+
- [🔧 Configuration](#-configuration)
|
|
26
|
+
- [💡 Features](#-features)
|
|
27
|
+
- [💻 Usage](#-usage)
|
|
28
|
+
- [🧪 Testing](#-testing)
|
|
29
|
+
- [🤝 Contributing](#-contributing)
|
|
30
|
+
- [📄 License](#-license)
|
|
31
|
+
- [📞 Contact](#-contact)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 📦 Installation
|
|
36
|
+
|
|
37
|
+
You can install the SharpAPI Python Client SDK via **PyPI** using `pip`:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install sharpapi-python-client
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Alternatively, if you prefer using **Poetry** for dependency management, you can add it to your project:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
poetry add sharpapi-python-client
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 🔧 Configuration
|
|
52
|
+
|
|
53
|
+
### 1. **Obtain Your SharpAPI API Key**
|
|
54
|
+
|
|
55
|
+
Sign up at [SharpAPI.com](https://sharpapi.com/) to obtain your API key.
|
|
56
|
+
|
|
57
|
+
### 2. **Set Up Environment Variables**
|
|
58
|
+
|
|
59
|
+
Create a `.env` file in your project's root directory to securely store your API key:
|
|
60
|
+
|
|
61
|
+
```env
|
|
62
|
+
SHARP_API_KEY=your_sharpapi_api_key_here
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Ensure that `.env` is included in your `.gitignore` to prevent accidental exposure of your API key.
|
|
66
|
+
|
|
67
|
+
### 3. **Loading Environment Variables**
|
|
68
|
+
|
|
69
|
+
The SDK uses `python-dotenv` to load environment variables. Ensure that your application initializes the environment variables before using the SDK:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from dotenv import load_dotenv
|
|
73
|
+
|
|
74
|
+
load_dotenv() # Loads environment variables from .env file
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 💡 Features
|
|
80
|
+
|
|
81
|
+
The **SharpAPI Python Client SDK** offers a comprehensive suite of AI-powered tools to enhance various aspects of your applications:
|
|
82
|
+
|
|
83
|
+
### **E-Commerce**
|
|
84
|
+
- **Generate Engaging Product Introductions**
|
|
85
|
+
- **Create Personalized Thank-You Emails**
|
|
86
|
+
- **Streamline Product Categorization**
|
|
87
|
+
- **Perform Sentiment Analysis on Product Reviews**
|
|
88
|
+
|
|
89
|
+
### **Content & Marketing Automation**
|
|
90
|
+
- **Translate Text for a Global Audience**
|
|
91
|
+
- **Paraphrase and Proofread Any Text**
|
|
92
|
+
- **Detect Spam Content**
|
|
93
|
+
- **Extract Contact Information**
|
|
94
|
+
- **Summarize Content and Generate Keywords/Tags**
|
|
95
|
+
- **Generate SEO Meta Tags**
|
|
96
|
+
|
|
97
|
+
### **HR Tech**
|
|
98
|
+
- **Generate Job Descriptions**
|
|
99
|
+
- **Identify Related Job Positions and Skills**
|
|
100
|
+
- **Parse and Extract Information from Resumes**
|
|
101
|
+
|
|
102
|
+
### **Travel, Tourism & Hospitality**
|
|
103
|
+
- **Analyze Sentiment in Travel Reviews**
|
|
104
|
+
- **Categorize Tours, Activities, and Hospitality Products**
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 💻 Usage
|
|
109
|
+
|
|
110
|
+
### 🛠 **Basic Example**
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
from sharpapi import SharpApiService
|
|
114
|
+
|
|
115
|
+
# Initialize the SharpApiService with your API key
|
|
116
|
+
sharp_api = SharpApiService(api_key='YOUR_SHARP_API_KEY')
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
# Example: Generate Product Categories
|
|
120
|
+
status_url = sharp_api.product_categories(
|
|
121
|
+
product_name='Lenovo Chromebook Laptop (2023), 14" FHD Touchscreen Slim 3, 8-Core MediaTek Kompanio 520 CPU, 4GB RAM, 128GB Storage',
|
|
122
|
+
language='German', # Optional
|
|
123
|
+
max_quantity=400, # Optional
|
|
124
|
+
voice_tone='Neutral', # Optional
|
|
125
|
+
context='Optional current e-store categories' # Optional
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# Fetch and print the results
|
|
129
|
+
result_sharp_api_job = sharp_api.fetch_results(status_url)
|
|
130
|
+
print(result_sharp_api_job.get_result_json())
|
|
131
|
+
except Exception as e:
|
|
132
|
+
print(f"An error occurred: {e}")
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 🛠 **Advanced Example: Parsing a Resume**
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from sharpapi import SharpApiService
|
|
139
|
+
|
|
140
|
+
# Initialize the SharpApiService with your API key
|
|
141
|
+
sharp_api = SharpApiService(api_key='YOUR_SHARP_API_KEY')
|
|
142
|
+
|
|
143
|
+
try:
|
|
144
|
+
# Parse Resume
|
|
145
|
+
status_url = sharp_api.parse_resume(
|
|
146
|
+
file_path='path/to/sample_resume.pdf',
|
|
147
|
+
language='English' # Optional
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Fetch and print the parsed resume data
|
|
151
|
+
parsed_resume = sharp_api.fetch_results(status_url)
|
|
152
|
+
print(parsed_resume.get_result_json())
|
|
153
|
+
except Exception as e:
|
|
154
|
+
print(f"An error occurred: {e}")
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🧪 Testing
|
|
160
|
+
|
|
161
|
+
This project uses Python's built-in `unittest` framework for testing.
|
|
162
|
+
|
|
163
|
+
### **Running Tests**
|
|
164
|
+
|
|
165
|
+
Ensure that you are in the project's root directory and that all dependencies are installed via Poetry or `pip`.
|
|
166
|
+
|
|
167
|
+
#### **Using Poetry:**
|
|
168
|
+
|
|
169
|
+
1. **Activate Poetry Shell:**
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
poetry shell
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
2. **Run Tests:**
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
python -m unittest discover tests
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### **Using pip and Virtual Environment:**
|
|
182
|
+
|
|
183
|
+
1. **Activate Your Virtual Environment:**
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
2. **Run Tests:**
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
python -m unittest discover tests
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### **Key Components:**
|
|
198
|
+
|
|
199
|
+
- **`src/sharpapi/`**: Contains the main SDK code.
|
|
200
|
+
- **`dto/`**: Data Transfer Objects for handling request and response data.
|
|
201
|
+
- **`enums/`**: Enumerations for standardized values across the SDK.
|
|
202
|
+
- **`sharp_api_service.py`**: Core service class to interact with SharpAPI endpoints.
|
|
203
|
+
- **`tests/`**: Contains unit tests for the SDK using Python's `unittest` framework.
|
|
204
|
+
- **`pyproject.toml`**: Configuration file managed by Poetry for dependencies and packaging.
|
|
205
|
+
- **`LICENSE`**: Licensing information.
|
|
206
|
+
- **`README.md`**: Project documentation.
|
|
207
|
+
- **`venv/`**: Virtual environment directory (should be excluded from version control).
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 🤝 Contributing
|
|
212
|
+
|
|
213
|
+
Contributions are welcome! Whether you're reporting a bug, suggesting an enhancement, or submitting a pull request, your input is valuable to us.
|
|
214
|
+
|
|
215
|
+
### **How to Contribute:**
|
|
216
|
+
|
|
217
|
+
1. **Fork the Repository**
|
|
218
|
+
|
|
219
|
+
Click the [Fork](https://github.com/sharpapi/sharpapi-python-client/fork) button at the top-right corner of the repository page.
|
|
220
|
+
|
|
221
|
+
2. **Clone Your Fork**
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
git clone https://github.com/yourusername/sharpapi-python-client.git
|
|
225
|
+
cd sharpapi-python-client
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
3. **Create a New Branch**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
git checkout -b feature/YourFeatureName
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
4. **Make Your Changes**
|
|
235
|
+
|
|
236
|
+
Implement your feature or fix. Ensure that your code adheres to the project's coding standards.
|
|
237
|
+
|
|
238
|
+
5. **Run Tests**
|
|
239
|
+
|
|
240
|
+
Ensure all tests pass before committing your changes.
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
poetry shell
|
|
244
|
+
python -m unittest discover tests
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
6. **Commit Your Changes**
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
git commit -m "Add feature XYZ"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
7. **Push to Your Fork**
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
git push origin feature/YourFeatureName
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
8. **Create a Pull Request**
|
|
260
|
+
|
|
261
|
+
Navigate to the original repository and click on "Compare & pull request." Provide a clear description of your changes.
|
|
262
|
+
|
|
263
|
+
### **Coding Standards:**
|
|
264
|
+
|
|
265
|
+
- Follow [PEP 8](https://pep8.org/) style guidelines.
|
|
266
|
+
- Write clear and concise docstrings for all modules, classes, and methods.
|
|
267
|
+
- Ensure that all new features are accompanied by corresponding unit tests.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## 📄 License
|
|
272
|
+
|
|
273
|
+
This project is licensed under the [MIT License](https://github.com/sharpapi/sharpapi-python-client/blob/main/LICENSE).
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 📞 Contact
|
|
278
|
+
|
|
279
|
+
For any questions, support, or inquiries, feel free to reach out:
|
|
280
|
+
|
|
281
|
+
- **Email**: [contact@sharpapi.com](mailto:contact@sharpapi.com)
|
|
282
|
+
- **Website**: [https://sharpapi.com](https://sharpapi.com/)
|
|
283
|
+
- **GitHub**: [https://github.com/sharpapi/sharpapi-python-client](https://github.com/sharpapi/sharpapi-python-client)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 📝 Changelog
|
|
288
|
+
|
|
289
|
+
Please see [CHANGELOG.md](https://github.com/sharpapi/sharpapi-python-client/blob/main/CHANGELOG.md) for more information on what has changed recently.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## 📚 Documentation
|
|
294
|
+
|
|
295
|
+
For detailed usage and API methods, please refer to the [SharpAPI Documentation](https://sharpapi.com/documentation).
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 🧰 Additional Resources
|
|
300
|
+
|
|
301
|
+
- **Poetry Documentation**: [https://python-poetry.org/docs/](https://python-poetry.org/docs/)
|
|
302
|
+
- **Python `unittest` Documentation**: [https://docs.python.org/3/library/unittest.html](https://docs.python.org/3/library/unittest.html)
|
|
303
|
+
- **SharpAPI Documentation**: [https://sharpapi.com/documentation](https://sharpapi.com/documentation)
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
## Social Media
|
|
307
|
+
|
|
308
|
+
🚀 For the latest news, tutorials, and case studies, don't forget to follow us on:
|
|
309
|
+
- [SharpAPI X (formerly Twitter)](https://x.com/SharpAPI)
|
|
310
|
+
- [SharpAPI YouTube](https://www.youtube.com/@SharpAPI)
|
|
311
|
+
- [SharpAPI Vimeo](https://vimeo.com/SharpAPI)
|
|
312
|
+
- [SharpAPI LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)
|
|
313
|
+
- [SharpAPI Facebook](https://www.facebook.com/profile.php?id=61554115896974)
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
Happy Coding! 🚀
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "sharpapi-python-client"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.1"
|
|
4
4
|
description = "SharpAPI.com Python SDK Client - AI-Powered Workflow Automation API."
|
|
5
5
|
authors = ["Dawid Makowski <contact@sharpapi.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -14,8 +14,8 @@ packages = [
|
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
[tool.poetry.dependencies]
|
|
17
|
-
python = "^3.
|
|
18
|
-
requests = ">=2.
|
|
17
|
+
python = "^3.10"
|
|
18
|
+
requests = ">=2.33.0"
|
|
19
19
|
|
|
20
20
|
[build-system]
|
|
21
21
|
requires = ["poetry-core"]
|
{sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/sharp_api_service.py
RENAMED
|
@@ -10,7 +10,7 @@ from .enums.sharp_api_job_type_enum import SharpApiJobTypeEnum
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SharpApiService:
|
|
13
|
-
def __init__(self, api_key, api_base_url='https://sharpapi.com/api/v1', user_agent='SharpAPIPythonClient/1.2.
|
|
13
|
+
def __init__(self, api_key, api_base_url='https://sharpapi.com/api/v1', user_agent='SharpAPIPythonClient/1.2.1'):
|
|
14
14
|
if not api_key:
|
|
15
15
|
raise ValueError('API key is required.')
|
|
16
16
|
self.api_key = api_key
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: sharpapi-python-client
|
|
3
|
-
Version: 1.0.1
|
|
4
|
-
Summary: SharpAPI.com Python SDK Client - AI-Powered Workflow Automation API.
|
|
5
|
-
Home-page: https://sharpapi.com
|
|
6
|
-
License: MIT
|
|
7
|
-
Author: Dawid Makowski
|
|
8
|
-
Author-email: contact@sharpapi.com
|
|
9
|
-
Requires-Python: >=3.8,<4.0
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Requires-Dist: requests (>=2.25.1)
|
|
18
|
-
Project-URL: Documentation, https://sharpapi.com/documentation
|
|
19
|
-
Project-URL: Repository, https://github.com/sharpapi/sharpapi-python-client
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
|
|
22
|
-
# SharpAPI Python Client SDK
|
|
23
|
-
|
|
24
|
-
🚀 Automate workflows with AI-powered API
|
|
25
|
-
|
|
26
|
-
## Leverage AI API to streamline workflows in E-Commerce, Marketing, Content Management, HR Tech, Travel, and more.
|
|
27
|
-
|
|
28
|
-
[](https://pypi.org/project/sharpapi-python-client/)
|
|
29
|
-
[](https://github.com/yourusername/sharpapi-python-client/blob/main/LICENSE)
|
|
30
|
-
|
|
31
|
-
#### Save time on repetitive content analysis and generation tasks that your app users perform daily.
|
|
32
|
-
|
|
33
|
-
See more at [SharpAPI.com Website »](https://sharpapi.com/)
|
|
34
|
-
|
|
35
|
-
## Requirements
|
|
36
|
-
|
|
37
|
-
- Python >= 3.6
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Installation
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
pip install sharpapi-python-client
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## What can it do for you?
|
|
47
|
-
|
|
48
|
-
- **E-commerce**
|
|
49
|
-
- Generate engaging product introductions.
|
|
50
|
-
- Create personalized thank-you emails.
|
|
51
|
-
- Streamline product categorization.
|
|
52
|
-
- Perform sentiment analysis on product reviews.
|
|
53
|
-
|
|
54
|
-
- **Content & Marketing Automation**
|
|
55
|
-
- Translate text for a global audience.
|
|
56
|
-
- Paraphrase and proofread any text.
|
|
57
|
-
- Detect spam content.
|
|
58
|
-
- Extract contact information.
|
|
59
|
-
- Summarize content and generate keywords/tags.
|
|
60
|
-
- Generate SEO meta tags.
|
|
61
|
-
|
|
62
|
-
- **HR Tech**
|
|
63
|
-
- Generate job descriptions.
|
|
64
|
-
- Identify related job positions and skills.
|
|
65
|
-
- Parse and extract information from resumes.
|
|
66
|
-
|
|
67
|
-
- **Travel, Tourism & Hospitality**
|
|
68
|
-
- Analyze sentiment in travel reviews.
|
|
69
|
-
- Categorize tours, activities, and hospitality products.
|
|
70
|
-
|
|
71
|
-
## Usage
|
|
72
|
-
|
|
73
|
-
### Simple Example
|
|
74
|
-
|
|
75
|
-
```python
|
|
76
|
-
from sharpapi.sharp_api_service import SharpApiService
|
|
77
|
-
|
|
78
|
-
sharp_api = SharpApiService('YOUR_SHARP_API_KEY')
|
|
79
|
-
|
|
80
|
-
try:
|
|
81
|
-
status_url = sharp_api.product_categories(
|
|
82
|
-
'Lenovo Chromebook Laptop (2023), 14" FHD Touchscreen Slim 3, 8-Core MediaTek Kompanio 520 CPU, 4GB RAM, 128GB Storage',
|
|
83
|
-
language='German', # optional
|
|
84
|
-
max_quantity=400, # optional
|
|
85
|
-
voice_tone='Neutral', # optional
|
|
86
|
-
context='Optional current e-store categories' # optional
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
result_sharp_api_job = sharp_api.fetch_results(status_url)
|
|
90
|
-
print(result_sharp_api_job.get_result_json())
|
|
91
|
-
except Exception as e:
|
|
92
|
-
print(e)
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Documentation
|
|
96
|
-
For detailed usage and API methods, please refer to the [SharpAPI Documentation](https://sharpapi.com/documentation).
|
|
97
|
-
|
|
98
|
-
## Changelog
|
|
99
|
-
Please see CHANGELOG for more information on what has changed recently.
|
|
100
|
-
|
|
101
|
-
## License
|
|
102
|
-
The MIT License (MIT). Please see License File for more information.
|
|
103
|
-
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# SharpAPI Python Client SDK
|
|
2
|
-
|
|
3
|
-
🚀 Automate workflows with AI-powered API
|
|
4
|
-
|
|
5
|
-
## Leverage AI API to streamline workflows in E-Commerce, Marketing, Content Management, HR Tech, Travel, and more.
|
|
6
|
-
|
|
7
|
-
[](https://pypi.org/project/sharpapi-python-client/)
|
|
8
|
-
[](https://github.com/yourusername/sharpapi-python-client/blob/main/LICENSE)
|
|
9
|
-
|
|
10
|
-
#### Save time on repetitive content analysis and generation tasks that your app users perform daily.
|
|
11
|
-
|
|
12
|
-
See more at [SharpAPI.com Website »](https://sharpapi.com/)
|
|
13
|
-
|
|
14
|
-
## Requirements
|
|
15
|
-
|
|
16
|
-
- Python >= 3.6
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pip install sharpapi-python-client
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## What can it do for you?
|
|
26
|
-
|
|
27
|
-
- **E-commerce**
|
|
28
|
-
- Generate engaging product introductions.
|
|
29
|
-
- Create personalized thank-you emails.
|
|
30
|
-
- Streamline product categorization.
|
|
31
|
-
- Perform sentiment analysis on product reviews.
|
|
32
|
-
|
|
33
|
-
- **Content & Marketing Automation**
|
|
34
|
-
- Translate text for a global audience.
|
|
35
|
-
- Paraphrase and proofread any text.
|
|
36
|
-
- Detect spam content.
|
|
37
|
-
- Extract contact information.
|
|
38
|
-
- Summarize content and generate keywords/tags.
|
|
39
|
-
- Generate SEO meta tags.
|
|
40
|
-
|
|
41
|
-
- **HR Tech**
|
|
42
|
-
- Generate job descriptions.
|
|
43
|
-
- Identify related job positions and skills.
|
|
44
|
-
- Parse and extract information from resumes.
|
|
45
|
-
|
|
46
|
-
- **Travel, Tourism & Hospitality**
|
|
47
|
-
- Analyze sentiment in travel reviews.
|
|
48
|
-
- Categorize tours, activities, and hospitality products.
|
|
49
|
-
|
|
50
|
-
## Usage
|
|
51
|
-
|
|
52
|
-
### Simple Example
|
|
53
|
-
|
|
54
|
-
```python
|
|
55
|
-
from sharpapi.sharp_api_service import SharpApiService
|
|
56
|
-
|
|
57
|
-
sharp_api = SharpApiService('YOUR_SHARP_API_KEY')
|
|
58
|
-
|
|
59
|
-
try:
|
|
60
|
-
status_url = sharp_api.product_categories(
|
|
61
|
-
'Lenovo Chromebook Laptop (2023), 14" FHD Touchscreen Slim 3, 8-Core MediaTek Kompanio 520 CPU, 4GB RAM, 128GB Storage',
|
|
62
|
-
language='German', # optional
|
|
63
|
-
max_quantity=400, # optional
|
|
64
|
-
voice_tone='Neutral', # optional
|
|
65
|
-
context='Optional current e-store categories' # optional
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
result_sharp_api_job = sharp_api.fetch_results(status_url)
|
|
69
|
-
print(result_sharp_api_job.get_result_json())
|
|
70
|
-
except Exception as e:
|
|
71
|
-
print(e)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Documentation
|
|
75
|
-
For detailed usage and API methods, please refer to the [SharpAPI Documentation](https://sharpapi.com/documentation).
|
|
76
|
-
|
|
77
|
-
## Changelog
|
|
78
|
-
Please see CHANGELOG for more information on what has changed recently.
|
|
79
|
-
|
|
80
|
-
## License
|
|
81
|
-
The MIT License (MIT). Please see License File for more information.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/dto/sharp_api_job.py
RENAMED
|
File without changes
|
|
File without changes
|
{sharpapi_python_client-1.0.1 → sharpapi_python_client-1.2.1}/src/sharpapi/enums/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|