Brewify
Brewify is a Python library that provides a simple interface to interact with various APIs, including Google Search, IMDb, Discord, and more. It is designed to be easy to use while allowing you to extend its functionality.
Features
- API Requests: Make GET requests to various endpoints.
- Error Handling: Custom exceptions for better error management.
- Multiple Services: Access Google Images, IMDb, Discord, and more.
- Sentiment Analysis: Analyze the sentiment of text.
- Chatbot Functionality: Engage in simple conversations.
- Joke Generator: Get a random joke.
Installation
You can install Brewify via pip:
pip install brewify
Usage
Initialize the Brewify Class
To get started, initialize the [Brewify]{.title-ref} class with your API key:
from brewify import Brewify
brewify = Brewify("YOUR_API_KEY")
Example Methods
Get Google Images
image_response = brewify.get_google_image(query="cats")
print(image_response.link)
Search Google
text_response = brewify.search_google(query="Python programming")
print(text_response.title, text_response.link, text_response.snippet)
IMDb Search
imdb_response = brewify.imdb_search(query="Inception")
print(imdb_response.plot)
Discord Guild Search
guild_response = brewify.discord_guild_search(invite_code="your_invite_code")
print(guild_response.id)
Sentiment Analysis
sentiment_response = brewify.sentiment_analysis(sentence="I love Python!")
print(sentiment_response.negative, sentiment_response.positive, sentiment_response.neutral)
Get a Joke
joke_response = brewify.joke()
print(f"{joke_response.setup} {joke_response.punchline}")
Error Handling
Brewify raises a custom exception called [Brexception]{.title-ref} for handling errors. You can catch it as follows:
try:
brewify.some_method()
except Brexception as e:
print(f"An error occurred: {e}")
Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License - see the [LICENSE] file for details.
Acknowledgments
- Thanks to the developers of the APIs used in this library.
- Special thanks to FastAPI for making API development a breeze.
Release files for brewify 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brewify-0.1.6.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brewify-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / brewify-0.1.6.tar.gz
| Download URL | brewify-0.1.6.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e67b529e785b744ac6738247ebd286b7429db5581df747744634f2a91f2877f
|
|
BLAKE2b-256 checksum How to use checksums |
c1d759bec69c6f74fafac18b5ebc198cd56f23cfd41e1ab1b0f5f02be7c1258d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / brewify-0.1.6-py3-none-any.whl
| Download URL | brewify-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
060ad3d9ba96b760efcdf7033b449335b7cfe67cc7409cf5dd852625fa1c8eeb
|
|
BLAKE2b-256 checksum How to use checksums |
362f7bcdabf2d65f431490d35eab71dd75355624c11da899e29ce8409bb9f760
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|