Python wrapper for Go applications with PowerShell launcher
Reason this release was yanked:
Broken
Project description
pygops
Python wrapper for running Go applications via PowerShell.
pip install pygops
Requirements
-
Python 3.8 or higher
-
PowerShell installed and accessible in PATH
-
Go installed for running Go applications
-
Dependencies (installed automatically):
logurutoomanyportsaiohttp(for server health checks)
Usage
Launch a Go script manually
from pygops import GoLauncher
launcher = GoLauncher(
go_file="path/to/script.go",
script_path=script_path,
verbose=True,
port=5000 # optional: will kill existing or choose random if omitted
)
launcher.thread.start()
Run a Go server with health check
import asyncio
from pygops import GoServer, get_go_launcher_script
script = get_go_launcher_script()
server = GoServer(
go_file="path/to/main.go",
script_path=script,
port=4000,
verbose=True
)
async def main():
await server.start()
running = await server.is_running()
print(f"Server running: {running}")
# ... later ...
await server.stop()
asyncio.run(main())
Execute Go script in its own thread
from pygops import GoThread, get_go_launcher_script
thread = GoThread(
go_file="path/to/task.go",
script_path=get_go_launcher_script(),
go_args=["--flag", "value"],
verbose=True
)
thread.start()
# Do other work...
if thread.is_running():
thread.terminate()
License
Released under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygops-0.1.4.tar.gz.
File metadata
- Download URL: pygops-0.1.4.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584d738b764907553786484334a763bf221fe7aed3678686124e761864e327f8
|
|
| MD5 |
aa1d350e2506b8ef7ba8ac67b9c192db
|
|
| BLAKE2b-256 |
d0262fb78c7cce9f3edc7595e78b3db6fa0e6483f8e298967fc2579d894a4b7e
|
File details
Details for the file pygops-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pygops-0.1.4-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38196a7a09b5f92d759033ea83e4400580313e5d1c47400db85855c0cbe96eaa
|
|
| MD5 |
d76b0dabb4afb4a8b9522f7faa87b6c6
|
|
| BLAKE2b-256 |
6e478c58ff35a12a9325ad4305d9591a222e8628a7b036c182f5663fb3da0be5
|