# python-process
![Build status](https://github.com/jonghwanhyeon/python-process/actions/workflows/publish.yml/badge.svg)
A Python package that provides a simple and intuitive interface for spawning, managing, and interacting with processes.
## Help
See [documentation](https://python-process.readthedocs.io) for more details
## Install
To install **python-process**, simply use pip:
```console
$ pip install python-process
```
## Usage
You can find more examples in [the documentation](https://python-process.readthedocs.io/examples/running-command/).
### Synchronous API
```python
from process import Process
def main() -> None:
with Process("echo 'Hello World!'") as process:
print(process.output()) # b'Hello World!\n'
if __name__ == "__main__":
main()
```
### Asynchronous API
```python
import asyncio
from process.asyncio import Process
async def main() -> None:
async with Process("echo 'Hello World!'") as process:
print(await process.output()) # b'Hello World!\n'
if __name__ == "__main__":
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jonghwanhyeon/python-process",
"name": "python-process",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "process, subprocess",
"author": "Jonghwan Hyeon",
"author_email": "jonghwanhyeon93@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3a/4a/180ad5f5339551aff64573ee537e9e5eaf3358b557189aa26efb5e5ed8b1/python_process-1.0.15.tar.gz",
"platform": null,
"description": "# python-process\n![Build status](https://github.com/jonghwanhyeon/python-process/actions/workflows/publish.yml/badge.svg)\n\nA Python package that provides a simple and intuitive interface for spawning, managing, and interacting with processes.\n\n## Help\nSee [documentation](https://python-process.readthedocs.io) for more details\n\n## Install\nTo install **python-process**, simply use pip:\n\n```console\n$ pip install python-process\n```\n\n## Usage\nYou can find more examples in [the documentation](https://python-process.readthedocs.io/examples/running-command/).\n\n### Synchronous API\n```python\nfrom process import Process\n\n\ndef main() -> None:\n with Process(\"echo 'Hello World!'\") as process:\n print(process.output()) # b'Hello World!\\n'\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n### Asynchronous API\n```python\nimport asyncio\n\nfrom process.asyncio import Process\n\n\nasync def main() -> None:\n async with Process(\"echo 'Hello World!'\") as process:\n print(await process.output()) # b'Hello World!\\n'\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package that provides a simple and intuitive interface for spawning, managing, and interacting with processes",
"version": "1.0.15",
"project_urls": {
"Homepage": "https://github.com/jonghwanhyeon/python-process"
},
"split_keywords": [
"process",
" subprocess"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5930f3e2627e996d8310cbf38d8e9e5c167e4ba339f5abe16c6c6d5a7960d9a8",
"md5": "93564b20bec5df34b605f3f2ed3bad88",
"sha256": "411d05e3d0684f48a8be2675a2ceb5eaf3348ecf39e783684de4519e37801068"
},
"downloads": -1,
"filename": "python_process-1.0.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "93564b20bec5df34b605f3f2ed3bad88",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 22720,
"upload_time": "2024-08-06T12:43:06",
"upload_time_iso_8601": "2024-08-06T12:43:06.093820Z",
"url": "https://files.pythonhosted.org/packages/59/30/f3e2627e996d8310cbf38d8e9e5c167e4ba339f5abe16c6c6d5a7960d9a8/python_process-1.0.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3a4a180ad5f5339551aff64573ee537e9e5eaf3358b557189aa26efb5e5ed8b1",
"md5": "a8c7773a03055862a7ee4f7cd929d0ac",
"sha256": "7e49e4c0a3e72e1334e6308223ae7c84af11aef57de8cc55bd03ff00f618b417"
},
"downloads": -1,
"filename": "python_process-1.0.15.tar.gz",
"has_sig": false,
"md5_digest": "a8c7773a03055862a7ee4f7cd929d0ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 14148,
"upload_time": "2024-08-06T12:43:10",
"upload_time_iso_8601": "2024-08-06T12:43:10.014367Z",
"url": "https://files.pythonhosted.org/packages/3a/4a/180ad5f5339551aff64573ee537e9e5eaf3358b557189aa26efb5e5ed8b1/python_process-1.0.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-06 12:43:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jonghwanhyeon",
"github_project": "python-process",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "python-process"
}