https://github.com/cmdvmd/codebusters-api
An API to generate K1, K2, K3, and random substitution Aristocrats, Patristocrats and Xenocrypts for the Codebusters Science Olympiad event
https://github.com/cmdvmd/codebusters-api
Last synced: about 1 year ago
JSON representation
An API to generate K1, K2, K3, and random substitution Aristocrats, Patristocrats and Xenocrypts for the Codebusters Science Olympiad event
- Host: GitHub
- URL: https://github.com/cmdvmd/codebusters-api
- Owner: cmdvmd
- License: mit
- Created: 2023-03-05T03:12:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-21T17:47:20.000Z (about 3 years ago)
- Last Synced: 2025-02-12T20:34:22.841Z (over 1 year ago)
- Language: Python
- Homepage: https://codebustersapi.pythonanywhere.com
- Size: 1.96 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Codebusters API
An API to generate Aristocrats and Patristocrats for Codebusters with K1, K2, and random substitution
encoding.
> **Note:** This API is hosted for free on [PythonAnywhere](https://www.pythonanywhere.com). If it no longer works, it
> may have been disabled. If this is the case, please [contact me](mailto:vcmd43@gmail.com) and I will renew the website
## Endpoints
* `aristocrat`
* `patristocrat`
* `xenocrypt`
Example Calls:
```
https://codebustersapi.pythonanywhere.com/aristocrat
```
```
https://codebustersapi.pythonanywhere.com/patristocrat
```
```
https://codebustersapi.pythonanywhere.com/xenocrypt
```
## Encoding with a Keyed Alphabet
Use the `alphabet` parameter with the value Random, K1, K2, or K3 (defaults to Random) to generate a problem that has
been encoded with the chosen alphabet
> **Note:** Keywords for xenocrypts will always be in English
*Example calls:*
```
https://codebustersapi.pythonanywhere.com/aristocrat?alphabet=K1
```
```
https://codebustersapi.pythonanywhere.com/patristocrat?alphabet=K2
```
```
https://codebustersapi.pythonanywhere.com/xenocrypt?alphabet=K3
```
## Response
Example response:
```json
{
"ciphertext": "D NDPW LEW ZKWMYH FQ LEW QILIKW CWLLWK LEMU LEW EDHLFKB FQ LEW OMHL.",
"plaintext": "I LIKE THE DREAMS OF THE FUTURE BETTER THAN THE HISTORY OF THE PAST."
}
```
* `ciphertext` - The encrypted text of the problem
* `plaintext` - The original quote from the problem
## Credits
Credit to [Codebuilder](https://github.com/AC01010/codebuilder) for [quotes list](quotes.txt)
and [keyword list](keywords.txt)
## Development
To develop this project further, [fork](https://github.com/cmdvmd/codebusters-api/fork) this repository and install
dependencies from [`requirements.txt`](requirements.txt) using `pip`