pyovpn-as


Namepyovpn-as JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/peritz/pyovpn-as
SummaryA Python library built on XML-RPC that demystifies remote interaction with OpenVPN Access Server
upload_time2023-06-12 21:08:40
maintainer
docs_urlNone
authorPeritz
requires_python
licenseGPL
keywords openvpn accessserver access server xml-rpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python OpenVPN Access Server SDK

A Python library built on XML-RPC that demystifies remote interaction with OpenVPN Access Server

OpenVPN Access Server provides an XML-RPC API that allows administrators to manage the server remotely and programatically. Unfortunately, OpenVPN explicitly provides this feature undocumented. This SDK provides a way to interact with this API, with helpful error messages, powerful functionality, and a clear explanation of what the hell you're looking at.

For support please email [peritz@pardonmynoot.com](mailto:peritz@pardonmynoot.com). Code is at https://github.com/peritz/pyovpn-as

## Getting Started

Getting started is simple. First you must enable the XML-RPC feature on your access server. This can be done either through the web interface by navigating to `Configurations -> Client Settings -> Enable Complete API` or by setting it via the command line `./sacli --key "xmlrpc.relay_level" --value 2 ConfigPut`

Now we can start running commands:

```python
>>> from pyovpn_as import client

>>> mgmt_client = client.from_args('https://ovpn.example.org/RPC2/', 'openvpn', 'P4ssw0rd!!!!')

>>> new_user = mgmt_client.users.create_new_user('newuser', 'P4ssw0rd123£', prop_superuser=True)

>>> new_user.type

"user_connect"

>>> new_user.is_admin

True

>>> mgmt_client.users.delete_user(as_client, '404')
Traceback (most recent call last):   
  File "<stdin>", line 1, in <module>
AccessServerProfileNotFoundError: User "404" does not exist
```

## Installation

`pip install pyovpn-as`

## How to Contribute

There are three main ways to contribute to this project:

- Search for open issues or open your own issue for a bug or problem discovered in the codebase or the documentation
- Submit a pull request to merge a feature or fix into the master branch (more information on how to do that and what maintainers expect from your code can be found in the full documentation)
- Use this SDK to poke at OpenVPN Access Server to find additional functionality, or to clarify the functionality given here, then open an issue and tell us what you found and how we can improve

We don't accept monetary contributions, everything you see is free :)

## License

GPL license, see the [License](./LICENSE)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/peritz/pyovpn-as",
    "name": "pyovpn-as",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "OpenVPN,AccessServer,Access Server,XML-RPC",
    "author": "Peritz",
    "author_email": "peritz@pardonmynoot.com",
    "download_url": "https://files.pythonhosted.org/packages/4f/4d/39b5684b527700f4500bffc9efd8b485c8c634d1652e93ffb72b1c461b4b/pyovpn-as-0.0.8.tar.gz",
    "platform": null,
    "description": "# Python OpenVPN Access Server SDK\n\nA Python library built on XML-RPC that demystifies remote interaction with OpenVPN Access Server\n\nOpenVPN Access Server provides an XML-RPC API that allows administrators to manage the server remotely and programatically. Unfortunately, OpenVPN explicitly provides this feature undocumented. This SDK provides a way to interact with this API, with helpful error messages, powerful functionality, and a clear explanation of what the hell you're looking at.\n\nFor support please email [peritz@pardonmynoot.com](mailto:peritz@pardonmynoot.com). Code is at https://github.com/peritz/pyovpn-as\n\n## Getting Started\n\nGetting started is simple. First you must enable the XML-RPC feature on your access server. This can be done either through the web interface by navigating to `Configurations -> Client Settings -> Enable Complete API` or by setting it via the command line `./sacli --key \"xmlrpc.relay_level\" --value 2 ConfigPut`\n\nNow we can start running commands:\n\n```python\n>>> from pyovpn_as import client\n\n>>> mgmt_client = client.from_args('https://ovpn.example.org/RPC2/', 'openvpn', 'P4ssw0rd!!!!')\n\n>>> new_user = mgmt_client.users.create_new_user('newuser', 'P4ssw0rd123\u00a3', prop_superuser=True)\n\n>>> new_user.type\n\n\"user_connect\"\n\n>>> new_user.is_admin\n\nTrue\n\n>>> mgmt_client.users.delete_user(as_client, '404')\nTraceback (most recent call last):   \n  File \"<stdin>\", line 1, in <module>\nAccessServerProfileNotFoundError: User \"404\" does not exist\n```\n\n## Installation\n\n`pip install pyovpn-as`\n\n## How to Contribute\n\nThere are three main ways to contribute to this project:\n\n- Search for open issues or open your own issue for a bug or problem discovered in the codebase or the documentation\n- Submit a pull request to merge a feature or fix into the master branch (more information on how to do that and what maintainers expect from your code can be found in the full documentation)\n- Use this SDK to poke at OpenVPN Access Server to find additional functionality, or to clarify the functionality given here, then open an issue and tell us what you found and how we can improve\n\nWe don't accept monetary contributions, everything you see is free :)\n\n## License\n\nGPL license, see the [License](./LICENSE)\n\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "A Python library built on XML-RPC that demystifies remote interaction with OpenVPN Access Server",
    "version": "0.0.8",
    "project_urls": {
        "Download": "https://github.com/peritz/pyovpn-as/archive/v_0_0_8.tar.gz",
        "Homepage": "https://github.com/peritz/pyovpn-as"
    },
    "split_keywords": [
        "openvpn",
        "accessserver",
        "access server",
        "xml-rpc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e40a72c3b8de2a512c263f44bb4661cd11e64296b5d6505b764547097652a7a1",
                "md5": "244f85aa315aea64ef2dea8e994fd074",
                "sha256": "1b9367edcb503dc61e6b6c23764064cece0719910cee5cc45cb94a1b7f9cf139"
            },
            "downloads": -1,
            "filename": "pyovpn_as-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "244f85aa315aea64ef2dea8e994fd074",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 47446,
            "upload_time": "2023-06-12T21:08:38",
            "upload_time_iso_8601": "2023-06-12T21:08:38.448759Z",
            "url": "https://files.pythonhosted.org/packages/e4/0a/72c3b8de2a512c263f44bb4661cd11e64296b5d6505b764547097652a7a1/pyovpn_as-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f4d39b5684b527700f4500bffc9efd8b485c8c634d1652e93ffb72b1c461b4b",
                "md5": "74b2fa00d67d480283940e8e9a288efc",
                "sha256": "e0bbd5bd20296375fd8ca34a62781a8a02714903f68c61131bdec5bafc30bab4"
            },
            "downloads": -1,
            "filename": "pyovpn-as-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "74b2fa00d67d480283940e8e9a288efc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45749,
            "upload_time": "2023-06-12T21:08:40",
            "upload_time_iso_8601": "2023-06-12T21:08:40.424277Z",
            "url": "https://files.pythonhosted.org/packages/4f/4d/39b5684b527700f4500bffc9efd8b485c8c634d1652e93ffb72b1c461b4b/pyovpn-as-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-12 21:08:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peritz",
    "github_project": "pyovpn-as",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyovpn-as"
}
        
Elapsed time: 0.17696s