I have a bad memory 😅 ! So, in order to deal with that and work with IT, I like to spend some time writing useful commands and doing a lot of practice with lab environments and even here, in this repository, because I belive in "learning by doing" style.
But over more than 15 years working with that, I believe I have now an issue to find commands using my knowledge base. Of course, today we have a LOT of great IA tools and good search engines to help us with that, but I really like to have my own custom database, with commands that make sense for me or have some kind of useful tip that I need in my day-to-day work.
Like I said, over the year I basically store a lot of commands in small and simple .md
files, which was good but now I have hundreds of files with a lot of information and very painful to search. I could use IA, but why not get this opportunity to learn something 😄.
My goal was to leave from basic .md
files to something more structured and maybe easier to search and edit.
Before:
After:
Postmand Visualization:
To achieve that, I have started to write a small API and use flask to be able to perform some requests, add commands, categories and edit them. In order to have a persistent data, of course, store that in a database.
As a DevOps engineer with a more infrastrucure than coding background, it was a good opportunity to increase my Python skills and also to learn more about how to create a REST API using this programming language.
So the result is what you can find in this repository 😊
There is still a lot of things to do here, but for now the installation is quite simple.
- Python 3.10 or higher
- PIP 24.0 or higher
Just install them using:
pip install -r requirements.txt
python kb_api.py
This will start a Flask app in localhost which can also be accessible via browser, looking for the healthcheck
page.
Please check the full API documentation HERE.
- Dockerize app
- Migrate to Postgres
- Kubernetes Deployment
- 0.1.0 API First release minor version