Please sign in to access this page
When working on production servers, there is a risk that a zero-day vulnerability may be discovered in one of the packages listed in the requirements.txt file. With Requirement Loader, you can update the requirements file hosted online (e.g., on GitHub), and it will automatically download and install the updated dependencies. It can then either restart the application immediately or, if the update is too complex, defer the update until the next scheduled restart.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Devlog #12:
I finally wrapped everything up! The documentation is done, the package is published on PyPI, and the next step is setting up a small demo website with links to everything – docs, PyPI, GitHub, etc.
In the end, Requirement Loader turned out to be a really solid project. I think not only I, but a lot of other developers could find it useful – whether for new projects or integrating it into existing ones.
There are actually so many features and config options now that it's hard to list them all. But here’s a quick overview:
- Automatically loads requirements.txt from a local or online source
- Supports things like authentication headers, proxies, and more
Flexible update options:
- Update on startup
- Background auto-updates
- Manual updates
- And more...
Time to take a breather – it was a lot of work, but totally worth it!
GitHub: https://github.com/Ivole32/requirement-loader
PyPi: https://pypi.org/project/requirement-loader/
Demo Website: https://ivole32.github.io/requirement_loader.html
Devlog #11:
I said I wanted to implement proper tests, but it's a bit tricky because of the reload feature. So for now, I'll test everything manually. After that, I'll write the documentation and publish this as a pip package.
Devlog #10:
So, I think everything should be working as intended now. But just to be sure, I'll write a proper test script to check all functionalities.
Devlog #9:
You all know I was freaking out about the logic errors in my code (well, just one really). I've been working on this, especially the part where the manual update function didn’t seem to work correctly. Turns out, I simply forgot to run the function a second time, which made me think it only worked once before being blocked by some mysterious logic... I spen TWO hours to find out that I simply forgot to write i = 0.
Devlog #8:
I added support for dynamically changing the source of the requirements file. But honestly, I'm freaking out a bit over all the logic errors in my project. There are so many arguments influencing each other, it's getting hard to keep track. I think it's time to make a proper flowchart and start debugging from there.
Devlog #7:
I’ve implemented the autoreload feature. Basically, if you enable it, the program packages will be automatically updated and your program will be reloaded. If the update is too complex or you prefer to handle it manually, there’s also a function for manual updating and optional reloading. You can also enable an update when the program is launched.
There’s still some work to do: I need to test different configuration combinations for bugs, write the documentation, replace the hardcoded variables with configurable ones, add support for venvs and clean up the code a bit.
Devlog #6:
I've been working on the autoreload feature for over two hours now. I ran into issues with the update thread and file reading/writing, but I think I’ll be able to implement it soon. I also added an option to set the update thread to silent mode, as well as a value to configure the update interval during class initialization.
Devlog #5:
I started to worke on the thread based update process and I will have to work on it tomorrow again.
Devlog #4:
I’ve made the project importable so anyone can add it to their own setup. Unfortunately, I can’t (and won’t) provide a demo yet, as the project isn’t ready for that. As I mentioned in Devlog #2, I’ll now focus on developing the autoreload feature.
Devlog #3:
Before I start working on the autoreload feature, I’ll make the project importable and take some time to rethink the project structure.
Devlog #2:
As I mentioned, I worked on making the requirements fetching more customizable. It now supports GitHub web interface links in addition to raw GitHub links, and it also supports local files. I'll start to work on the autoreload feature.
Devlog #1:
This is my new project because I believe it can make every sysadmin's life easier. I started by setting up a pip package and implemented basic functionality to fetch a README from GitHub and install the associated package. Now, I'm working on making the requirements fetching more customizable.