Skip to main content

A Python library for interacting with various APIs including Google Search, IMDb, and Discord.

Project description

Brewify

Brew{width="50px" height="50px"}

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]{.title-ref} file for details.

Dependencies -----

Python Icon{.align-center width="50px" height="50px"}

FastAPI Icon{.align-center width="50px" height="50px"}

PyPI Icon{.align-center width="50px" height="50px"}

Acknowledgments

  • Thanks to the developers of the APIs used in this library.
  • Special thanks to FastAPI for making API development a breeze.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brewify-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brewify-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file brewify-0.1.0.tar.gz.

File metadata

  • Download URL: brewify-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for brewify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a91638152650f4d262d1de6d8a57edc2e1a53089284cff7d9114c8cb3187f33d
MD5 1edd2dc86a8aecc96cb9a5cd17d19b2a
BLAKE2b-256 ec83fde748f9cf07de6e295f568c8ad4eb8af6540661e0d2959dc300e1370be0

See more details on using hashes here.

File details

Details for the file brewify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: brewify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for brewify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 976327aaa6dc4db256a2d563b36133407c96de06570444bfa94b24c8290ad882
MD5 f5b3e1c5f6d0e2456129eb9903863477
BLAKE2b-256 2408e5a27bacb0393ff98fd51e597caa3cbddcc7ef80d792531e62cdee635d72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page