# file_reloader Library
The file_reloader library provides a convenient way for users to automatically reload their Python programs whenever the source code changes. This can be particularly useful during development and testing phases.
## Installation
```python
pip install file-reloader
```
## Usage
1. Import the `file_reloader` module from the Reloader library.
```python
from file_reloader import Reloader
```
2. Create an instance of the `Reloader` class.
```python
my_reloader = Reloader()
```
3. Add the following code at the end of your program to enable automatic reloading.
```python
my_reloader.reloader()
```
## Parameters
- **file_path** (str): Absolute path of the file (default is `sys.argv[0]`).
- **args** (List[str]): Extra arguments required for the program (default is `None`).
- **reload_time** (int): Expected amount of time after which the reloader checks for updates (default is `5 sec`).
Now, whenever you make changes to your source code and save the file, the program will automatically reload without the need to restart it manually.
## Example
```python
# your_program.py
import file_reloader
# Your program code goes here...
my_reloader = file_reloader.Reloader()
my_reloader.reloader()
```
## Important Note
Ensure that you place the `reloader()` call at the end of your program to avoid any interference with the rest of your code.
Raw data
{
"_id": null,
"home_page": "",
"name": "file-reloader",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "reloader,autoreload,file-reloader,code reloading,automatic refresh,development workflow,source code monitoring,Python productivity,efficient coding,file change detection,development environment,PyPI package,GitHub code reloader,streamlined development,time-saving coding,source code watcher,open-source reloader,continuous development,coding efficiency,automated code updates,developer productivity,project auto-reload,real-time code changes,dependency-free autoreloading,easy integration,seamless code refresh,responsive coding environment,hands-free code reloading,lightweight auto-reload,source code agility,smart code update",
"author": "",
"author_email": "Mohammad Ummair <mohdummair007@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/03/1c/fc479272fd6f0c9b58c8b70f51a3b161b36f19cdf88dc37a52a42dad6f1a/file-reloader-1.0.5.tar.gz",
"platform": null,
"description": "# file_reloader Library\n\nThe file_reloader library provides a convenient way for users to automatically reload their Python programs whenever the source code changes. This can be particularly useful during development and testing phases.\n\n## Installation\n\n```python\npip install file-reloader\n```\n\n\n## Usage\n\n1. Import the `file_reloader` module from the Reloader library.\n\n ```python\n from file_reloader import Reloader\n ```\n\n2. Create an instance of the `Reloader` class.\n\n ```python\n my_reloader = Reloader()\n ```\n\n3. Add the following code at the end of your program to enable automatic reloading.\n\n ```python\n my_reloader.reloader()\n ```\n \n## Parameters\n\n- **file_path** (str): Absolute path of the file (default is `sys.argv[0]`).\n- **args** (List[str]): Extra arguments required for the program (default is `None`).\n- **reload_time** (int): Expected amount of time after which the reloader checks for updates (default is `5 sec`).\n\nNow, whenever you make changes to your source code and save the file, the program will automatically reload without the need to restart it manually.\n\n## Example\n\n```python\n# your_program.py\n\nimport file_reloader\n\n# Your program code goes here...\n\nmy_reloader = file_reloader.Reloader()\n\nmy_reloader.reloader()\n```\n\n## Important Note\n\nEnsure that you place the `reloader()` call at the end of your program to avoid any interference with the rest of your code.\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "file-reloader allows user program to reload automatically when source code of user program changes",
"version": "1.0.5",
"project_urls": null,
"split_keywords": [
"reloader",
"autoreload",
"file-reloader",
"code reloading",
"automatic refresh",
"development workflow",
"source code monitoring",
"python productivity",
"efficient coding",
"file change detection",
"development environment",
"pypi package",
"github code reloader",
"streamlined development",
"time-saving coding",
"source code watcher",
"open-source reloader",
"continuous development",
"coding efficiency",
"automated code updates",
"developer productivity",
"project auto-reload",
"real-time code changes",
"dependency-free autoreloading",
"easy integration",
"seamless code refresh",
"responsive coding environment",
"hands-free code reloading",
"lightweight auto-reload",
"source code agility",
"smart code update"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "031cfc479272fd6f0c9b58c8b70f51a3b161b36f19cdf88dc37a52a42dad6f1a",
"md5": "71cea28043cdf8683206766325af92cc",
"sha256": "30f2fa1236c0bee943ea6a37d77dff3f4b986b80048e10199f4546d9d4fa0f37"
},
"downloads": -1,
"filename": "file-reloader-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "71cea28043cdf8683206766325af92cc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3341,
"upload_time": "2024-01-15T08:07:20",
"upload_time_iso_8601": "2024-01-15T08:07:20.264898Z",
"url": "https://files.pythonhosted.org/packages/03/1c/fc479272fd6f0c9b58c8b70f51a3b161b36f19cdf88dc37a52a42dad6f1a/file-reloader-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-15 08:07:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "file-reloader"
}