Observed since 21 Oct, 11:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A super AI-powered library to determine if number is odd or odd with power of AI
Why determine if something is odd or odd the usual way when you can do it with ✨AI✨?
Our library has 100% test coverage!
ai-is-odd is a Python library that uses OpenAI's GPT-4o-mini model to tell if a number is even or odd. Add some AI magic to your number-checking tasks!
To install ai-is-odd, use pip:
pip install ai-is-odd
OPENAI_API_KEY=your-api-key
Replace your-api-key with your actual OpenAI API key.
Here’s an example of how to use the ai-is-odd package in your project:
from ai_is_odd import is_odd
# Example usage
number = 5
result = is_odd(number)
print(f"Is {number} odd? {result}") # Output: Is 5 odd? True
is_odd(number)
number (int) - The number to check.bool - True if the number is odd, False if even.ValueError if the API response is inconclusive or if there's an issue with the request.To test the is_odd library, use the unittest framework:
python -m unittest discover -s tests
To check code coverage, make sure you have coverage installed:
pip install coverage
Run tests with coverage enabled:
coverage run -m unittest discover -s tests
To see a summary report in the terminal, use:
coverage report
To create a detailed HTML report:
coverage html
Open htmlcov/index.html in your browser to view the line-by-line coverage details.
Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.
This project is licensed under the Apache 2.0 license.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.2 | 28 Oct 2024 | 6 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d6e18a01f43b567a8bf51cbdf2a9a0bc73668c18b8593ff893cc2bd72bd63c09