A synchronous, object oriented API wrapper for thecatapi

Overview

cats.py

A synchronous, object oriented API wrapper for thecatapi

Table Of Content

Installation

  • Install it from pypi

    pip install cats.py
  • To install the development version, clone this repository and install it. You need git installed for this

    pip install git+https://github.com/MarzaElise/cats.py.git

Usage

If you don't already have an API key, get one here

from cats import Client

client = Client(api_key="YOUR API KEY HERE")

breed = client.search_breed("beng")

print(breed)

The above code should print something similar to this

screenshot

Contributing

This module/repository is new and might break at any moment. Which is why all pull requests that bring good changes are welcome.

If you are new to github and wondering how to contribute, click here

If you are confused on what would be a good contribution, take a look at the open issues

FAQ

  1. Are all endpoints supported?

    • All of the endpoints except for images/upload works perfectly as I tested them locally before publishing
    • All breeds/ endpoints might break since the API is constantly adding new properties
  2. Why is utils/_dataclasses.py such a code-gore?

    • Data returned by the API is inconsistent. For example, some properties are sometimes given and sometimes not. To manage that I set them all to None by default
  3. How is this wrapper object oriented?

    • All values returned by each method has its own class (Breed, Vote, Favourite etc)
    • This entire wrapper revolves around dataclasses and subclassing
  4. I found a bug, how do I report?

    • You can contact me on discord at Marcus | Bot Dev#4438
    • If you are not on discord, open a new issue
    • If you also have a fix for it, create a new pull request and I'll merge it if its good. (See Contributing)
  5. Will there be an aync version of this?

    • I currently have no plans to do it in the near future. If you really want an asynchronous wrapper, take a look at catapi.py
  6. Is this wrapper consistent?

    • I tried my best to keep this wrapper consistent with the API itself. By returning lists when API returns an array etc.
  7. Where is the documentation?

    • Currently, there is no documentation for this wrapper. Alternatively, you can take a look at the API documentation and the source to figure out some stuff.

Note: all changes were tested on python 3.10.0 64-bit before being published

License

GNU AGPLv3

You might also like...
A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

An API wrapper around Discord API.

NeoCord This project is work in progress not for production use. An asynchronous API wrapper around Discord API written in Python. Features Modern API

This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

YARSAW is an Async Python API Wrapper for the Random Stuff API.

Yet Another Random Stuff API Wrapper - YARSAW YARSAW is an Async Python API Wrapper for the Random Stuff API. This module makes it simpler for you to

A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key).

fulltmdb A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key). Installation Use the package manager pip t

EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% API coverage Most of the codebase is documented

A simple Python API wrapper for Cloudflare Stream's API.

python-cloudflare-stream A basic Python API wrapper for working with Cloudflare Stream. Arbington.com started off using Cloudflare Stream. We used the

Comments
  • Organizing

    Organizing

    • Currently the wrapper isnt much of organizing.
      • BASE URL must be in a constants.py or a similar file
      • requests should be done using a utility method where #2 could be fixed
    opened by MarzaElise 1
Releases(1.0.0)
  • 1.0.0(Nov 30, 2021)

    • This version brings an "async_cats" package that provides support for asynchronous environment.
    • More examples are now available in /examples
    • Expect all the dataclasses to be converted to pydantic.BaseModel classes in v1.1.0

    Full Changelog: https://github.com/MarzaElise/cats.py/compare/0.1.6...1.0.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.6(Oct 18, 2021)

    What's Changed

    • Docstrings by @MarzaElise in https://github.com/MarzaElise/cats.py/pull/7
    • Argument Validation with pydantic

    Support for images/upload will be available soon 🙏

    Source code(tar.gz)
    Source code(zip)
This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

Anonymous 27 Oct 28, 2022
Pincer-ext-commands - A simple, lightweight package for pincer prefixed commands

pincer.ext.commands A reimagining of pincer's command system and bot system. Ins

Vincent 2 Jan 11, 2022
UNLIMITED CALL AND SMS BOMBING PYTHON SCRIPT

cc_sim_crack v.1 An open-source SMS/call bomber for Linux And Termux. Note: Due misusing of cc_sim_crack, several API's died. Don't be afraid if you d

CYBER CRACKER OFFICIAL 3 Jul 05, 2021
pylunasvg - Python bindings for lunasvg

pylunasvg - Python bindings for lunasvg Pylunasvg is a simple wrapper around lunasvg that uses pybind11 to create python bindings. All public API of t

Eren 6 Jan 05, 2023
A python api to get info on covid-19

A python api to get info on covid-19

roof 2 Sep 18, 2022
A mass creator for Discord's new channel threads.

discord-thread-flooder A mass creator for Discord's new channel threads. (obv created by https://github.com/imvast) Warning: this may lag ur pc if u h

Vast 6 Nov 04, 2022
Dns-Client-Server - Dns Client Server For Python

Dns-client-server DNS Server: supporting all types of queries and replies. Shoul

Nishant Badgujar 1 Feb 15, 2022
Chatbot construido com o framework Rasa para responder dúvidas referentes ao COVID-19.

Racom Chatbot Chatbot construido com o framework Rasa. Como executar Necessário instalar Docker e Docker Compose. Para inicializar a aplicação, basta

Vinícius Souza 4 Jul 28, 2022
pyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Master Server

PyDuinoCoin PyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Main Server. I

BackrndSource 6 Jul 14, 2022
A management system designed for the employees of MIRAS (Art Gallery). It is used to sell/cancel tickets, book/cancel events and keeps track of all upcoming events.

Art-Galleria-Management-System Its a management system designed for the employees of MIRAS (Art Gallery). Backend : Python Frontend : Django Database

Areesha Tahir 8 Nov 30, 2022
Code for paper "Adversarial score matching and improved sampling for image generation"

Adversarial score matching and improved sampling for image generation This repo contains the official implementation for the ICLR 2021 paper Adversari

Alexia Jolicoeur-Martineau 114 Dec 11, 2022
Python: Asynchronous client for the Tailscale API

Python: Asynchronous client for the Tailscale API Asynchronous client for the Tailscale API. About This package allows you to control and monitor Tail

Franck Nijhof 9 Nov 22, 2022
Discord Mafia Game Bot using nextcord

Mafia-Bot Discord Mafia Game Bot using nextcord Features Mafia Game Game Replays Installation Run the following command to install required modules: p

Nian 6 Nov 19, 2022
A Telegram UserBot to Play Radio in Voice Chats. This is also the source code of the userbot which is being used for playing Radio in @AsmSafone Channel.

Telegram Radio Player UserBot A Telegram UserBot to Play Radio in Channel or Group Voice Chats. This is also the source code of the userbot which is b

SAF ONE 44 Nov 12, 2022
Telegram music & video bot direct play music

Telegram music & video bot direct play music

noinoi-X 1 Dec 28, 2021
A simple python bot that serves to send some notifications about GitHub events to Slack.

github alerts slack bot 🤖 What is it? 🔍 This is a simple bot that serves to send some notifications about GitHub events to Slack channels. These are

Jackson Alves 10 Dec 10, 2022
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 02, 2022
471 Dec 24, 2022
Temperature Monitoring and Prediction Using a Modified Lambda Architecture

Temperature Monitoring and Prediction Using a Modified Lambda Architecture A more detailed write up can be seen in this paper. Original Lambda Archite

Parsa Yousefi 2 Jun 27, 2022
A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API

PytomicDEX Makerbot A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API Install sudo apt install wget curl jq g

6 Aug 25, 2022