Library for calling methods over sockets
Project description
Installing
To install use the command python -m pip install Network-Script
.
Basic Tutorial
Server
To start off import the Server
class:
from netsc import Server
Then create a subclass of the Server
class, defining bind_addr
and possibly sock_family
, sock_type
, and sock_proto
:
class MyServer(Server):
bind_addr = ('', 1920)
Then create an instance, define the object it wraps, and accept a connection:
server = MyServer(wrapped_obj)
server.accept()
Client
To start off import the Server
class:
from netsc import Client
Then create a subclass of the Server
class, possibly defining sock_family
, sock_type
, and sock_proto
:
class MyClient(Client):
pass
Then create an instance, define the object it wraps, and connect to a server:
client = MyClient(wrapped_obj)
client.connect(('localhost', 1920))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file Network_Script-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: Network_Script-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64a3f29570e5bad6acc23baa3c4055b015bc0a07cf26f616ea7fecb7ab0f4594 |
|
MD5 | d48272c589426d7edf5fda1e1c2a5290 |
|
BLAKE2b-256 | 2e75d317ebf185fec4bbd89254cd0db9ee9ffb16d201e115a6b83b7572e36744 |