Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zingzy/panda-api
A cute API for pandas written in PythonπΌ
https://github.com/zingzy/panda-api
animals api facts facts-api fastapi flask gifs images panda panda-api python
Last synced: about 2 months ago
JSON representation
A cute API for pandas written in PythonπΌ
- Host: GitHub
- URL: https://github.com/zingzy/panda-api
- Owner: Zingzy
- Created: 2024-01-18T17:04:37.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-21T18:31:41.000Z (12 months ago)
- Last Synced: 2024-01-22T22:06:27.426Z (12 months ago)
- Topics: animals, api, facts, facts-api, fastapi, flask, gifs, images, panda, panda-api, python
- Language: HTML
- Homepage: https://pandaa.vercel.app
- Size: 83.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
β¬οΈ random gif using our api π
πΌ Panda API π
Welcome to the Panda API, where cuteness meets information about everyone's favorite black and white bears! This API serves random panda facts and adorable pictures to brighten up your day.
π Documentation
### Base URL
- **URL:** `https://pandaa.vercel.app`
- **Description:** The base URL for all endpoints.
- **Note:** All endpoints are relative to the base URL.π Endpoints
### Random Panda Fact
- **Endpoint:** `/fact`
- **Method:** `GET`
- **Description:** Get a random panda fact to amaze your friends with panda knowledge! π§ πΌ### Random Panda Picture URL
- **Endpoint:** `/pic`
- **Method:** `GET`
- **Description:** Obtain the URL of a random panda picture for an instant dose of cuteness. πΈπΎ### Random Panda GIF URL
- **Endpoint:** `/gif`
- **Method:** `GET`
- **Description:** Get the URL of a random panda GIF to share the panda love! ππΌ
β¬οΈ random pic using our api π
### Random Panda Picture (Raw)
- **Endpoint:** `/raw_pic`
- **Method:** `GET`
- **Description:** Experience the panda cuteness with a streaming response of a random panda picture. πΌοΈπΌ### Random Panda GIF (Raw)
- **Endpoint:** `/raw_gif`
- **Method:** `GET`
- **Description:** Experience the panda cuteness with a streaming response of a random panda GIF. π₯πΌ### Random Fact, Picture URL, and GIF URL (All in One)
- **Endpoint:** `/all`
- **Method:** `GET`
- **Description:** Get a random panda fact, picture URL, and GIF URL in one request. ππΌ### All Panda Facts
- **Endpoint:** `/all-facts`
- **Method:** `GET`
- **Description:** Explore a collection of all panda facts. Impress your friends with a wealth of panda trivia! ππΌ### All Panda Pictures URLs
- **Endpoint:** `/all-pics`
- **Method:** `GET`
- **Description:** Access URLs of all panda pictures available in the API. Share the love for pandas with these adorable images. ππΌ### All Panda GIFs URLs
- **Endpoint:** `/all-gifs`
- **Method:** `GET`
- **Description:** Access URLs of all panda GIFs available in the API. Share the love for pandas with these adorable GIFs. ππΌ### Specific Panda Picture
- **Endpoint:** `/i/{file_name}`
- **Method:** `GET`
- **Description:** Retrieve a specific panda picture by filename. Customize your panda experience! πΌοΈπΌ### Specific Panda GIF
- **Endpoint:** `/g/{file_name}`
- **Method:** `GET`
- **Description:** Retrieve a specific panda GIF by filename. Customize your panda experience! π₯πΌ_For a more detailed API visit : https://pandaa.vercel.app/docs_
π οΈ Installation
### Direct Deployment
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/Zingzy/panda-api)
### Manual Setup
1. Clone the repository `git clone https://github.com/Zingzy/panda-api.git`.
2. Install the required packages using `pip install -r requirements.txt`.
3. Install [uvicorn](https://www.uvicorn.org/) using `pip install uvicorn`.
4. Run the server using `uvicorn main:app --reload`.π€ Contributing
Feel free to contribute to the Panda API by adding more panda facts, pictures, or improving the code. Create a pull request, and let's make the panda world even more delightful! ππΌ
## Submission Guidelines
- Create a new branch for your changes.
- Make sure your code is formatted using [Black Formatter](https://pypi.org/project/black/)
- If you are adding a new panda fact, add it to the `facts.txt` file in a new line, ending with a full stop.
- If you are adding a new panda picture, add it to the `pics` folder.
- The picture filename should be in the format `{number}.jpg`, where `{number}` is the next number in the sequence.
- The picture should **not be more than 300 KB** in size.
- If you are adding a new panda GIF, add it to the `gifs` folder.
- The GIF filename should be in the format `{number}.gif`, where `{number}` is the next number in the sequence.
- The GIF should **not be more than 2 MB** in size.**Enjoy the Panda API! πΌβ¨**