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.
Metadata
Release files for Network-Script 1.0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Network Script-1.0.6.1.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Network_Script-1.0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / Network Script-1.0.6.1.tar.gz
| Download URL | Network Script-1.0.6.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3308cfca2e29d4f90c1f2271e1e0b7a11edd55421c5db35fe8f48a52626d664
|
|
BLAKE2b-256 checksum How to use checksums |
22a020f01e680d08e0b8043be86fdb004f38557915fcb455b8b01a354810d8fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / Network_Script-1.0.6.1-py3-none-any.whl
| Download URL | Network_Script-1.0.6.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f07e41f9d41084b850bf14eecb52ee6bf73b4dd29ebf728c0b5d95535bcc55f
|
|
BLAKE2b-256 checksum How to use checksums |
c0edf04d7baa4c70a3b4e6cc6030a6d3ec945754a70b17951084f605fe0fef8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|