Welcome to the SharpAPI Python Test Suite repository! This educational project is designed to help Python developers familiarize themselves with SharpAPI, an AI-powered API that streamlines workflow automation across various applications. Through a comprehensive set of tests, this repository showcases how to integrate and utilize SharpAPI's capabilities to enhance your projects.
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Available Tests
- Project Structure
- Contributing
- License
- Contact
- Interactive Test Selection: Choose which SharpAPI endpoint to test via a command-line interface.
- Comprehensive Endpoint Coverage: Tests cover a wide range of SharpAPI functionalities, including:
- Ping
- Quota Information
- Resume Parsing
- Job Description Generation
- Related Skills & Job Positions
- Sentiment Analysis
- Product Categorization & Introduction
- Email Generation
- Contact Information Detection
- Spam Detection
- Text Summarization & Keyword Generation
- Translation & Paraphrasing
- Proofreading & SEO Tag Generation
- Travel & Hospitality Insights
- Logging: Detailed logs for each test, making it easy to track results and debug issues.
- Randomized Data Generation: Simulate diverse inputs using randomized strings and data.
Before you begin, ensure you have met the following requirements:
- Python 3.8 or higher: Ensure Python is installed on your machine. You can download it from python.org.
- SharpAPI Account: Sign up at SharpAPI.com to obtain your API key.
- Git: For cloning the repository. Download from git-scm.com if not already installed.
-
Clone the Repository
git clone https://github.com/yourusername/sharpapi-python-test-suite.git cd sharpapi-python-test-suite
-
Create a Virtual Environment (Optional but Recommended)
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install Dependencies
pip install -r requirements.txt
If
requirements.txt
is not provided, install the necessary packages manually:pip install python-dotenv questionary sharpapi
-
Set Up Environment Variables
Create a
.env
file in the root directory of the project and add your SharpAPI API key:SHARP_API_KEY=your_sharpapi_api_key_here
-
Prepare Additional Files
- Resume File: If you plan to test the
parse_resume
endpoint, ensure you have a sample resume file namedsample_resume.pdf
in the project directory. Alternatively, update theresume_file_path
variable in the script to point to your resume file.
- Resume File: If you plan to test the
Run the test suite using the following command:
python run_sharpapi_tests.py
Upon execution, you'll be presented with an interactive menu to select which test you'd like to run.
? Which test would you like to run? [Use arrows to move, type to filter]
❯ Ping
Quota
Parse Resume
Generate Job Description
Related Skills
Related Job Positions
Product Review Sentiment
Product Categories
Generate Product Intro
Generate Thank You Email
Detect Phones
Detect Emails
Detect Spam
Summarize Text
Generate Keywords
Translate
Paraphrase
Proofread
Generate SEO Tags
Travel Review Sentiment
Tours and Activities Product Categories
Hospitality Product Categories
Exit
Use the arrow keys to navigate and press Enter to select a test. The selected test will execute, and results will be logged to the console.
Here's a list of all the available tests you can run:
- Ping: Check the connectivity to SharpAPI.
- Quota: Retrieve your current subscription quota and usage.
- Parse Resume: Parse a resume file and extract structured data.
- Generate Job Description: Create a detailed job description based on parameters.
- Related Skills: Find skills related to a given skill name.
- Related Job Positions: Identify job positions related to a specified role.
- Product Review Sentiment: Analyze the sentiment of a product review.
- Product Categories: Categorize a product into relevant categories.
- Generate Product Intro: Create an engaging introduction for a product.
- Generate Thank You Email: Compose a personalized thank-you email.
- Detect Phones: Extract phone numbers from text.
- Detect Emails: Extract email addresses from text.
- Detect Spam: Identify spam content within text.
- Summarize Text: Generate a summary of a lengthy text.
- Generate Keywords: Produce relevant keywords for given content.
- Translate: Translate text into a specified language.
- Paraphrase: Rephrase text to improve clarity or style.
- Proofread: Correct grammatical errors in text.
- Generate SEO Tags: Create SEO-friendly meta tags based on content.
- Travel Review Sentiment: Analyze the sentiment of travel-related reviews.
- Tours and Activities Product Categories: Categorize tours and activities products.
- Hospitality Product Categories: Categorize hospitality-related products.
- Exit: Terminate the test suite.
sharpapi-python-test-suite/
├── .env
├── run_sharpapi_tests.py
├── sample_resume.pdf
├── requirements.txt
├── README.md
└── LICENSE
- .env: Environment variables configuration file.
- run_sharpapi_tests.py: Main script containing all test functions and the interactive menu.
- sample_resume.pdf: Sample resume file for testing the
parse_resume
endpoint. - requirements.txt: Lists all Python dependencies.
- README.md: Project documentation (this file).
- LICENSE: License information.
-
Clone the Repository
git clone https://github.com/yourusername/sharpapi-python-test-suite.git cd sharpapi-python-test-suite
-
Set Up Virtual Environment and Install Dependencies
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Configure Environment Variables
Create a
.env
file and add your SharpAPI API key:SHARP_API_KEY=your_sharpapi_api_key_here
-
Run the Test Suite
python run_sharpapi_tests.py
Select the desired test from the interactive menu and view the results in the console.
Contributions are welcome! If you have suggestions, bug reports, or enhancements, please open an issue or submit a pull request.
-
Fork the Repository
-
Create a New Branch
git checkout -b feature/YourFeatureName
-
Commit Your Changes
git commit -m "Add Your Feature"
-
Push to the Branch
git push origin feature/YourFeatureName
-
Open a Pull Request
For any questions or support, feel free to reach out:
- Email: contact@sharpapi.com
- Website: https://SharpAPI.com
🚀 For the latest news, tutorials, and case studies, don't forget to follow us on:
Happy coding! 🚀