Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thegoldenpro/aghpb-api
π Feature Rich API for Anime Girls Holding Programming Books
https://github.com/thegoldenpro/aghpb-api
aghpb anime anime-girls anime-girls-holding-programming-books
Last synced: 2 months ago
JSON representation
π Feature Rich API for Anime Girls Holding Programming Books
- Host: GitHub
- URL: https://github.com/thegoldenpro/aghpb-api
- Owner: THEGOLDENPRO
- License: mit
- Created: 2023-07-11T00:03:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T01:16:11.000Z (2 months ago)
- Last Synced: 2024-10-28T05:15:19.485Z (2 months ago)
- Topics: aghpb, anime, anime-girls, anime-girls-holding-programming-books
- Language: Python
- Homepage: https://api.devgoldy.xyz/aghpb/v1
- Size: 1.42 MB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# π AGHPB API
Behold the **anime girls holding programming books** API!
[![Docker Badge](https://img.shields.io/docker/v/devgoldy/aghpb_api?label=docker)](https://hub.docker.com/r/devgoldy/aghpb_api "We're on docker!")
This is an API I made for the anime girls holding programming books [github repo](https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books) because I was bored.
It's a rewrite of the [old API](https://github.com/THEGOLDENPRO/aghpb_api_legacy) but written in Python using the [Fast API](https://github.com/tiangolo/fastapi) library instead.
It scrapes a local copy of the repo and thanks to that I was able to implement headers like ``Book-Date-Added`` (returns the date and time a book was added).> oh yeah also check out our π cousin API **(anime girls and computers)**: https://github.com/r3tr0ananas/agac-api
## π Publicly available instances
Pick the closest instance to you for FASTER ANIME GIRLS!| Country | URL | Hosted by | Notes |
|:-----------:|-------|:-------------:|:---------:|
| π¬π§ | [``https://api.devgoldy.xyz/aghpb/v1``](https://api.devgoldy.xyz/aghpb/v1) | [me](https://github.com/THEGOLDENPRO) | β Official Instance |
| π©πͺ | [``https://aghpb.teaishealthy.me``](https://aghpb.teaishealthy.me) | [teaishealthy](https://github.com/teaishealthy) |
| π©πͺ | [``https://api.ananas.moe/aghpb/v1``](https://api.ananas.moe/aghpb/v1) | [Ananas](https://github.com/r3tr0ananas) | π οΈ π£οΈ GERMAN ENGINEERING!!! |
| πΈπͺ | [``https://aghpb.zeeraa.net``](https://aghpb.zeeraa.net) | [Zeeraa](https://github.com/AntonUden) |
| πΊπΈ | [`https://api.emmatech.dev/aghpb`](https://api.emmatech.dev/aghpb) | [EmmmaTech](https://github.com/EmmmaTech) | πΊπΈ π¦ FREEDOMMMMMMMM!!! |> Also do use these instances as backups incase my servers at https://api.devgoldy.xyz go down.
## π« API Wrappers
I was also even more bored so I decided to write an API wrapper in every mfing language I can possible, including those I've never really written in.These are the languages I've written so far:
- **π¦ Rust - [``aghpb.rs``](https://github.com/THEGOLDENPRO/aghpb.rs)** (async)
- **π¦ TypeScript - [``aghpb.ts``](https://github.com/THEGOLDENPRO/aghpb.ts)** (async)
- **β« C - [``aghpb.c``](https://github.com/THEGOLDENPRO/aghpb.c)** ~~(might blow up)~~
- **π₯ Mojo - ``Soonβ’``**
- **π΅ Go - ``Soonβ’``**
- **π Lua - [``aghpb.lua``](https://github.com/THEGOLDENPRO/aghpb.lua)**Then here are some community-made api wrappers **( thanks π )**:
- **β Java - [``AGHPB4J``](https://github.com/JoshiCodes/AGHPB4J)**## π οΈ Wanna self-host?
If you would like to host your own instance of the aghpb API continue reading.### π¬ Docker Method (recommended)
> [!Warning]
> The docker image currently only supports **x86** architecture so if you are running anything else you may need to build the image yourself. For instructions on how to do that check out [here](#%EF%B8%8F-building-your-own-docker-image).The easiest method to host an instance is via our [docker image](https://hub.docker.com/r/devgoldy/aghpb_api/tags). From now on in this section, I'm gonna assume you've had experience with [Docker](https://www.docker.com/) and you can at least complete the [hello world tutorial](https://docker-curriculum.com/#getting-started).
Spinning up an aghpb API container in docker is pretty simple:
1. First pull that mf
```sh
docker pull devgoldy/aghpb_api:latest
```
2. Then launch a container with this command. ``-p`` binds the api to your localhost port 8000.
```sh
docker run -p 127.0.0.1:8000:8000/tcp devgoldy/aghpb_api:latest
```
3. Now visit ``localhost:8000`` in your browser and there you go! π
> *if you want to host via docker-compose, [this file](https://github.com/THEGOLDENPRO/aghpb_api/blob/main/docker-compose.yml) might be useful to you*### βοΈ Building your own docker image.
To build your own docker image it is necessary you follow the [native method's](#-native-method-recommended-for-development) steps, but only up to **step number 3** is necessary.Once that is done run the command below:
```sh
make docker-build
```
> ``docker images`` should display the "devgoldy/aghpb_api" image.Now you may jump to **step 2** of the [docker method](#-docker-method-recommended).
### π Native Method (recommended for development)
#### Prerequisites:
- [Git](https://git-scm.com/downloads)
- [Python](https://www.python.org/downloads/) (3.8 - 3.11)
- [Make](https://www.gnu.org/software/make/#download) ***(otherwise you'll have to copy the commands from the [Makefile](https://github.com/THEGOLDENPRO/aghpb_api/blob/main/Makefile))***1. Clone the repo.
```sh
git clone https://github.com/THEGOLDENPRO/aghpb_api && cd aghpb_api
```
2. Create env.
```sh
python -m venv env
source env/bin/activate # For windows it's --> cd env/Scripts && activate && cd ../../
```
3. Install the API's dependencies.
```sh
make
```
4. Pull the ~~anime girls~~ programming books.
```sh
make pull-repo
```
5. Run that sh#t.
```sh
make run
```
6. Visit ``localhost:8000`` in your browser, then all should be good! π