Name | symply JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Effortless Symlink Management as a Python Package! |
upload_time | 2024-04-21 06:41:02 |
maintainer | None |
docs_url | None |
author | Spoked |
requires_python | <4.0,>=3.11 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Symply - Advanced Symlink Management and Monitoring
Symply is a Python library designed to provide robust symlink creation, deletion, and monitoring functionality. It helps developers handle file system events efficiently and perform specific actions based on those events, such as creating or managing symlinks dynamically.
## Features
- **Symlink Management**: Easily create and delete symlinks using straightforward Python functions.
- **File System Monitoring**: Monitor directories for changes like creation, deletion, modification, and moving of files or directories.
- **Event-Driven Actions**: Execute custom actions based on file system events using user-defined callback functions.
- **Customizable Filters**: Specify which files to monitor based on patterns, enhancing the flexibility and efficiency of the monitoring process.
## Installation
To install Symply, clone this repository and include it in your project, or use pip to install directly from the source:
```bash
pip install symply
```
## Usage
### Symlink Management
#### Creating a Symlink
```python
from symply import symlink
symlink('/path/to/source', '/path/to/target', force=True)
```
#### Deleting a Symlink
```python
from symply import delete_symlink
delete_symlink('/path/to/target')
```
### File System Monitoring
Set up monitoring to react to file system events:
```python
from symply.watcher import SymlinkMonitor, SymlinkHandler
def handle_event(path, event_type, destination=None):
print(f"Event: {event_type}, Path: {path}")
if destination:
print(f"Destination: {destination}")
handler = SymlinkHandler(handle_event)
monitor = SymlinkMonitor('/path/to/watch', handler)
monitor.start()
```
### Stop Monitoring
```python
input("Monitoring... Press Enter to stop.\n")
monitor.stop()
```
## Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE` for more information.
Raw data
{
"_id": null,
"home_page": null,
"name": "symply",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Spoked",
"author_email": "dreu.lavelle@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/44/a0/c820e60661221ff493e70abdd5d14ea34a9db77db7cea6a3089418cbb307/symply-0.1.1.tar.gz",
"platform": null,
"description": "# Symply - Advanced Symlink Management and Monitoring\n\nSymply is a Python library designed to provide robust symlink creation, deletion, and monitoring functionality. It helps developers handle file system events efficiently and perform specific actions based on those events, such as creating or managing symlinks dynamically.\n\n## Features\n\n- **Symlink Management**: Easily create and delete symlinks using straightforward Python functions.\n- **File System Monitoring**: Monitor directories for changes like creation, deletion, modification, and moving of files or directories.\n- **Event-Driven Actions**: Execute custom actions based on file system events using user-defined callback functions.\n- **Customizable Filters**: Specify which files to monitor based on patterns, enhancing the flexibility and efficiency of the monitoring process.\n\n## Installation\n\nTo install Symply, clone this repository and include it in your project, or use pip to install directly from the source:\n\n```bash\npip install symply\n```\n\n## Usage\n\n### Symlink Management\n\n#### Creating a Symlink\n\n```python\nfrom symply import symlink\n\nsymlink('/path/to/source', '/path/to/target', force=True)\n```\n\n#### Deleting a Symlink\n\n```python\nfrom symply import delete_symlink\n\ndelete_symlink('/path/to/target')\n```\n\n### File System Monitoring\n\nSet up monitoring to react to file system events:\n\n```python\nfrom symply.watcher import SymlinkMonitor, SymlinkHandler\n\ndef handle_event(path, event_type, destination=None):\n print(f\"Event: {event_type}, Path: {path}\")\n if destination:\n print(f\"Destination: {destination}\")\n\nhandler = SymlinkHandler(handle_event)\nmonitor = SymlinkMonitor('/path/to/watch', handler)\nmonitor.start()\n```\n\n### Stop Monitoring\n\n```python\ninput(\"Monitoring... Press Enter to stop.\\n\")\nmonitor.stop()\n```\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Effortless Symlink Management as a Python Package!",
"version": "0.1.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "104b4072f57dbf4a5427696fe24bb9a2a3e5b40ac6f0dfdee26e1bb7098ec8af",
"md5": "ab1a95e892f3856a926ac3a2547a4634",
"sha256": "19398b596690eede66fe74e7afbd652caa0fbff8e6cf14344b1d57f9f384e819"
},
"downloads": -1,
"filename": "symply-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab1a95e892f3856a926ac3a2547a4634",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 6221,
"upload_time": "2024-04-21T06:41:00",
"upload_time_iso_8601": "2024-04-21T06:41:00.519228Z",
"url": "https://files.pythonhosted.org/packages/10/4b/4072f57dbf4a5427696fe24bb9a2a3e5b40ac6f0dfdee26e1bb7098ec8af/symply-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "44a0c820e60661221ff493e70abdd5d14ea34a9db77db7cea6a3089418cbb307",
"md5": "74706d53e24538443043410f1b743f66",
"sha256": "7d4f964e110eb8773fe71e16d078cd411b55e073ab0104e4b1f29ef9faf21c03"
},
"downloads": -1,
"filename": "symply-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "74706d53e24538443043410f1b743f66",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 4974,
"upload_time": "2024-04-21T06:41:02",
"upload_time_iso_8601": "2024-04-21T06:41:02.049814Z",
"url": "https://files.pythonhosted.org/packages/44/a0/c820e60661221ff493e70abdd5d14ea34a9db77db7cea6a3089418cbb307/symply-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-21 06:41:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "symply"
}