PyReload
Library for quick interaction with the code in the file. PyReload - allows you to update the code in real time
Configuration
In order not to keep track of all the files, they can be placed in the ignore file, according to the standard it is '._ingore'. To do this, you will need:
1. Create a ignore file
2. Add ignored files
3. Run the script (if the file is called differently, then pass its name through the 'ignore_file' parameter)
ps: Creating a file is optional
# Example ignore file
pr = PyReload(ignore_file = 'custom_name_ignore_file.txt')
Examples
pyreload + aiogram
# update code in framework aiogram
import os
from pyreload import PyReload
...
async def pyreload_task():
while 1:
await pr.update_file.hash().async_run()
await asyncio.sleep(1)
async def on_startup(_):
logging.info("Bot started")
logging.info("Started waiting reload")
asyncio.create_task(pyreload_task())
if __name__ == '__main__':
pr = PyReload(path=os.listdir())
executor.start_polling(dp, skip_updates=True, on_startup=on_startup)
pyreload + vkbottle
# update code in framework aiogram
import os
from pyreload import PyReload
...
@bot.loop_wrapper.interval(seconds=1)
async def pyreload_task():
await pr.update_file.hash().async_run()
if __name__ == '__main__':
pr = PyReload(path = os.listdir())
bot.run_forever()
Metadata
Release files for python-reload 0.1.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-reload-0.1-0.tar.gz | 3.0 kB | Without provenance | Details |
Release files / python-reload-0.1-0.tar.gz
| Download URL | python-reload-0.1-0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4fb281143a497093184c521e6883115800444fac6b4144531bef7f71460b72a
|
|
BLAKE2b-256 checksum How to use checksums |
9f72c65961b6f6b29cd9621c7461a0a4a82e16d17f70d355dee37d0e95f83898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.9
|
Security for python-reload 0.1.post0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.