python-pppd
Simple library for controlling PPP connections with pppd.
Under the hood it uses the subprocess module to interact with pppd to create and disconnect PPP
connections.
Installation
Make sure pppd is installed on your system, typically on Ubuntu/Debian:
$ apt-get install pppd
And on Fedora/CentOS/RedHat:
$ dnf install pppd
Then you can install the latest release from PyPi:
$ pip install python-pppd
Alternatively, clone and install the latest development version from GitHub:
$ git clone https://github.com/cour4g3/python-pppd
$ cd python-pppd
$ pip install -e .
Getting Started
You can connect to an existing configured PPP connection:
>>> from pppd import PPPConnection
>>> ppp = PPPConnection(call='work') # blocks until connected
>>> ppp.connected() # check if connected, raises error if connection error
True
>>> ppp.laddr # address of local host
'10.0.0.1'
>>> ppp.raddr # address of remote client
'10.0.0.2'
You can specify any positional or keyword arguments:
>>> PPPConnection('/dev/ttyS0', connect='/usr/bin/chat -v -f /etc/chatscripts/A1')
Which is equivalent to the following:
$ sudo pppd /dev/ttyS0 connect "/usr/bin/chat -v -f /etc/chatscripts/A1"
Normally you require sudo to use pppd, if you don't have it and have setup
the pppd binary with setuid-root or are running as root you can use:
>>> PPPConnection(sudo=False)
You can also specify an alternate paths to pppd or sudo if the libary cannot
find them:
>>> PPPConnection(sudo_path='/usr/local/bin/sudo', pppd_path='/usr/local/sbin/pppd')
License
Licensed under the MIT license.
Metadata
Release files for python-pppd 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_pppd-1.0.8.tar.gz | 5.2 kB | Without provenance | Details for python_pppd-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_pppd-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for python_pppd-1.0.8-py3-none-any.whl |
Total release size: 9.8 kB
Release files / python_pppd-1.0.8.tar.gz
| Download URL | python_pppd-1.0.8.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dac1bec79c526ee66196fdbb771e962097ac5dfa49d5624c8746e651fc29e42
|
|
BLAKE2b-256 checksum How to use checksums |
de30df89c4c162d75d8de4e4e52cdb3247b6079a29f3cd0ec077e1c1056246cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.12
|
Release files / python_pppd-1.0.8-py3-none-any.whl
| Download URL | python_pppd-1.0.8-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d501b0f9e171f4b67f474b488cd41a0a152828d6d284bc7150ffe49194d6011
|
|
BLAKE2b-256 checksum How to use checksums |
0ba31b68dab629e29265ca2f93fff27e928fa4b83a88a004422eb920c195acf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.12
|
Security for python-pppd 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.