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 Client class:
from netsc import Client
Then create a subclass of the Client 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))
From then
From now on one end can call the poll method, and the other end can then call any method and get any attribute of the wrapped class. Note concerning attributes: to get an attribute the attribute must be listed in the attrs attribute of the end initiating the attribute get.
Project details
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 Network Script-1.0.6.1.tar.gz.
File metadata
- Download URL: Network Script-1.0.6.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- 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 |
b3308cfca2e29d4f90c1f2271e1e0b7a11edd55421c5db35fe8f48a52626d664
|
|
| MD5 |
efde464b6328a8284f5df68453a85a86
|
|
| BLAKE2b-256 |
22a020f01e680d08e0b8043be86fdb004f38557915fcb455b8b01a354810d8fd
|
File details
Details for the file Network_Script-1.0.6.1-py3-none-any.whl.
File metadata
- Download URL: Network_Script-1.0.6.1-py3-none-any.whl
- Upload date:
- Size: 6.4 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 |
0f07e41f9d41084b850bf14eecb52ee6bf73b4dd29ebf728c0b5d95535bcc55f
|
|
| MD5 |
35b468691a6ceb4760c32cd25f3bdb73
|
|
| BLAKE2b-256 |
c0edf04d7baa4c70a3b4e6cc6030a6d3ec945754a70b17951084f605fe0fef8f
|