wgconfig


Namewgconfig JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://www.github.com/towalink/wgconfig
Summaryparsing and writing WireGuard configuration files
upload_time2024-01-30 20:34:11
maintainer
docs_urlNone
authorDirk Henrici
requires_python>=2.7
license
keywords wireguard configuration config wg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # wgconfig

Parsing and writing WireGuard configuration files (comment preserving)

WireGuard config files are ini-style. Since all "Peer" sections have the same name, these files cannot be parsed and modified by most libraries handling configuration files. Most existing libraries are not able to preserve or even add comments when modifying a config file. "wgconfig" was created to work with WireGuard configuration files and to preserve comments.

---

## Features

- Read and parse WireGuard configuration files and make the data available as Python dictionaries.
- Create new WireGuard configuration files.
- Add peers to WireGuard configuration files and delete peers from WireGuard configuration files.
- Save and clone WireGuard configuration files.
- Comments are preserved when reading and writing WireGuard configuration files.
- Leading comments may be added when creating sections or attributes.
- Such comments may be deleted when removing sections or attributes.
- No other libraries are needed, i.e. no dependencies.

---

## Installation

Install using PyPi:

```shell
pip3 install wgconfig
```

---

## Quickstart

### Reading and parsing an existing WireGuard configuration file

Read and parse the existing WireGuard configuration file 'wg0.conf' located in '/etc/wireguard':

```python
import wgconfig
wc = wgconfig.WGConfig('wg0')
wc.read_file()
print('INTERFACE DATA:', , wc.get_interface())
print('LIST OF PEERS:', wc.get_peers())
print('ALL PEER DATA:', wc.get_peers(keys_only=False))
```

Add a new peer with a comment line before the peer section:
```python
wc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', '# Newly added peer')
```

Add an attribute to that peer:
```python
wc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'Endpoint', 'wg.example.com:51820', '# Added for demonstration purposes')
```

Write the changes to disk. Comments that were present when reading the file are preserved.
```python
wc.write_file()
```

Please see below for more detailed usage information.

### Creating a new WireGuard configuration file

Create a new WireGuard configuration file as '/root/wgtest.conf':

```python
import wgconfig
wc = wgconfig.WGConfig('/root/wgtest.conf')
# Add attribute to Interface section (denoted by 'None')
wc.add_attr(None, 'PrivateKey', '6FYKQKEtGFAb5HSwyj5cQl3wgS1E9d6SqVjdVksOn2s=')
# Save to disk
wc.write_file()
# Access the data
print('INTERFACE DATA:', wc.get_interface())
print('LIST OF PEERS (there are no peers yet):', wc.get_peers())
print('ALL PEER DATA (there are no peers yet):', wc.get_peers(keys_only=False))
```

The module also contains simple wrappers around the wg command (contained in WireGuard tools) to generate and manage keys:

```python
import wgconfig.wgexec as wgexec
# Create a new WireGuard private key
private_key = wgexec.generate_privatekey()
```

More information and examples can be found here:

- [Detailed example for reading WireGuard config files](https://github.com/towalink/wgconfig/blob/master/doc/example_notebook_1.md)
- Please see the section below for detailed API description.

---

## Detailed API description

### Properties

#### interface

*Returns attributes and values (including wgconfig-internal ones) of the Interface section as a dictionary*

Notes:
* You might want to use the more flexible `get_interface()` method (see further below) instead.

#### peers

*Returns attributes and values (including wgconfig-internal ones) of all peers as a nested dictionary*

Notes:
* You might want to use the more flexible `get_peers()` method (see further below) instead.

### Methods for interaction

#### `__init__(file)`

*Initializes the instance*

Parameters:
* "file" (str): Path of the WireGuard configuration file
    You may also just provide the interface name. In this case, the path '/etc/wireguard' is assumed along with a file extension '.conf'.

Examples:
* `wc = wgconfig.WGConfig('wg0')`
* `wc = wgconfig.WGConfig('/etc/wireguard/wg0.conf')`

#### `read_file()`

*Reads the WireGuard config file from disk into memory*
        
#### `write_file(file)`

*Writes a WireGuard config file from memory to file*
      
Parameters:
* "file" (str, optional, default: None): Path of the WireGuard configuration file
    You may also just provide the interface name. In this case the path '/etc/wireguard' is assumed along with a file extension '.conf'.
    In case the parameter is missing, the config file defined on object initialization is used.

Examples:
* `wc.write_file()`
* `wc.write_file('wg0')`
* `wc.write_file('/etc/wireguard/wg0.conf')`

#### `initialize_file(leading_comment)`

*Empties the file and adds the interface section header*

Parameters:
* "leading_comment" (str, optional, default: None): Comment line to be added before the Interface section. Must start with a '#' to indicate a comment.

Examples:
* `wc.initialize_file()`
* `wc.initialize_file('# Here comes the Interface section:')`

#### `get_interface(include_details)`

*Returns a dictionary of the attributes and values of the interface section*

Parameters:
* "include_details" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).

Examples:
* `ifdata = wc.get_interface()`

#### `get_peers(keys_only, include_disabled, include_details)`

*Returns a list of peers or - if selected - a dictionary including peers' data*

Parameters:
* "keys_only" (boolean, optional, default: True): Return only the public keys as a list or return keys and corresponding data as a dictionary.
* "include_disabled" (boolean, optional, default: False): Also return data of disabled peers.
* "include_details" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).

Examples:
* `peers = wc.get_peers()`
* `peerdata = wc.get_peers(keys_only=False)`

#### `get_peer(key, include_details)`

*Returns the data of the peer with the given (public) key*

Parameters:
* "key" (str): Public key of the peer
* "include_details" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).

Examples:
* `peerdata = wc.get_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`
* `peerdata = wc.get_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', include_details=True)`

Notes:
* Don't forget to call `read_file()` before attempting to get data out of a file
* Access the `peers` property if you want to retrieve the data of all peers    

#### `add_peer(key, leading_comment)`

*Adds a new peer with the given (public) key*

Parameters:
* "key" (str): Public key of the new peer
* "leading_comment" (str, optional, default: None): Comment line to be added before the Peer section. Must start with a '#' to indicate a comment.

Examples:
* `wc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`
* `wc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', '# Here comes the Interface section:')`

#### `del_peer(key)`

*Removes the peer with the given (public) key*

Note: Comment lines immediately before the Peer section are removed, too.

Parameters:
* "key" (str): Public key of the peer

Examples:
* `wc.del_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`

#### `add_attr(key, attr, value, leading_comment, append_as_line)`

*Adds an attribute/value pair to the given peer ('None' for adding an interface attribute)*

Parameters:
* "key" (str): Key of the peer. Set to 'None' to denote the Interface section
* "attr" (str) Name of the attribute to add
* "value" (str or int) Value of the attribute to add
* "leading_comment" (str, optional, default: None): Comment line to be added before the Peer section. Must start with a '#' to indicate a comment.
* "append_as_line" (bool, optional, default: False): Whether to add the attribute as a new line if another attribute with the same name already exists. If "False", adding an attribute that already exists results in comma-separated attribute values. This way, "AllowedIPs" can be added one by one.

Examples:
* `wc.add_attr(None, 'ListenPort', '51820')`
* `wc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0')`
* `wc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0', '# Allow all IPv4 addresses', append_as_line=True)`

#### `del_attr(self, key, attr, value, remove_leading_comments)`

*Removes an attribute/value pair from the given peer ('None' for adding an interface attribute); set 'value' to 'None' to remove all values*

Parameters:
* "key" (str): Key of the peer. Set to 'None' to denote the Interface section
* "attr" (str) Name of the attribute to remove
* "value" (str or int, optional, default: None) Value of the attribute to remove
    Set to 'None' if all values (either comma-separated or is multiple attribute lines) shall be removed. Otherwise specify the specific value to be removed.
* "remove_leading_comments" (bool, optional, default: True): Indicates whether comment lines before the attribute line(s) shall be removed, too

Examples:
* `wc.del_attr(None, 'ListenPort')`
* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs')`
* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0')`
* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0', remove_leading_comments=False)`

#### `disable_peer(self, key)`

*Disables the peer with the given (public) key by prepending `#!` to all lines in a peer section*

Parameters:
* "key" (str): Public key of the peer

Examples:
* `wc.disable_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`

#### `enable_peer(self, key)`

*Enables the peer with the given (public) key by removing `#!` from all lines in a peer section*

Parameters:
* "key" (str): Public key of the peer

Examples:
* `wc.enable_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`

#### `get_peer_enabled(self, key)`

*Checks whether the peer with the given (public) key is enabled*

Parameters:
* "key" (str): Public key of the peer

Examples:
* `wc.get_peer_enabled('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`

---

## Reporting bugs

In case you encounter any bugs, please report the expected behavior and the actual behavior so that the issue can be reproduced and fixed.

---
## Developers

### Clone repository

Clone this repo to your local machine using `https://github.com/towalink/wgconfig.git`

Install the module temporarily to make it available in your Python installation:
```shell
pip3 install -e <path to root of "src" directory>
```

### Run unit tests

Call "pytest" to run the unit tests:
```shell
pytest <path to root of "test" directory>
```

---

## License

[![License](http://img.shields.io/:license-agpl3-blue.svg?style=flat-square)](https://opensource.org/licenses/AGPL-3.0)

- **[AGPL3 license](https://opensource.org/licenses/AGPL-3.0)**
- Copyright 2020-2023 © <a href="https://github.com/towalink/wgconfig" target="_blank">Dirk Henrici</a>.
- [WireGuard](https://www.wireguard.com/) is a registered trademark of Jason A. Donenfeld.

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.github.com/towalink/wgconfig",
    "name": "wgconfig",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7",
    "maintainer_email": "",
    "keywords": "WireGuard configuration config wg",
    "author": "Dirk Henrici",
    "author_email": "towalink.wgconfig@henrici.name",
    "download_url": "https://files.pythonhosted.org/packages/aa/9f/e408e5c04f7a92cb6de206a64a7bd1d291a611969bca469fed743f38de35/wgconfig-1.0.1.tar.gz",
    "platform": null,
    "description": "# wgconfig\n\nParsing and writing WireGuard configuration files (comment preserving)\n\nWireGuard config files are ini-style. Since all \"Peer\" sections have the same name, these files cannot be parsed and modified by most libraries handling configuration files. Most existing libraries are not able to preserve or even add comments when modifying a config file. \"wgconfig\" was created to work with WireGuard configuration files and to preserve comments.\n\n---\n\n## Features\n\n- Read and parse WireGuard configuration files and make the data available as Python dictionaries.\n- Create new WireGuard configuration files.\n- Add peers to WireGuard configuration files and delete peers from WireGuard configuration files.\n- Save and clone WireGuard configuration files.\n- Comments are preserved when reading and writing WireGuard configuration files.\n- Leading comments may be added when creating sections or attributes.\n- Such comments may be deleted when removing sections or attributes.\n- No other libraries are needed, i.e. no dependencies.\n\n---\n\n## Installation\n\nInstall using PyPi:\n\n```shell\npip3 install wgconfig\n```\n\n---\n\n## Quickstart\n\n### Reading and parsing an existing WireGuard configuration file\n\nRead and parse the existing WireGuard configuration file 'wg0.conf' located in '/etc/wireguard':\n\n```python\nimport wgconfig\nwc = wgconfig.WGConfig('wg0')\nwc.read_file()\nprint('INTERFACE DATA:', , wc.get_interface())\nprint('LIST OF PEERS:', wc.get_peers())\nprint('ALL PEER DATA:', wc.get_peers(keys_only=False))\n```\n\nAdd a new peer with a comment line before the peer section:\n```python\nwc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', '# Newly added peer')\n```\n\nAdd an attribute to that peer:\n```python\nwc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'Endpoint', 'wg.example.com:51820', '# Added for demonstration purposes')\n```\n\nWrite the changes to disk. Comments that were present when reading the file are preserved.\n```python\nwc.write_file()\n```\n\nPlease see below for more detailed usage information.\n\n### Creating a new WireGuard configuration file\n\nCreate a new WireGuard configuration file as '/root/wgtest.conf':\n\n```python\nimport wgconfig\nwc = wgconfig.WGConfig('/root/wgtest.conf')\n# Add attribute to Interface section (denoted by 'None')\nwc.add_attr(None, 'PrivateKey', '6FYKQKEtGFAb5HSwyj5cQl3wgS1E9d6SqVjdVksOn2s=')\n# Save to disk\nwc.write_file()\n# Access the data\nprint('INTERFACE DATA:', wc.get_interface())\nprint('LIST OF PEERS (there are no peers yet):', wc.get_peers())\nprint('ALL PEER DATA (there are no peers yet):', wc.get_peers(keys_only=False))\n```\n\nThe module also contains simple wrappers around the wg command (contained in WireGuard tools) to generate and manage keys:\n\n```python\nimport wgconfig.wgexec as wgexec\n# Create a new WireGuard private key\nprivate_key = wgexec.generate_privatekey()\n```\n\nMore information and examples can be found here:\n\n- [Detailed example for reading WireGuard config files](https://github.com/towalink/wgconfig/blob/master/doc/example_notebook_1.md)\n- Please see the section below for detailed API description.\n\n---\n\n## Detailed API description\n\n### Properties\n\n#### interface\n\n*Returns attributes and values (including wgconfig-internal ones) of the Interface section as a dictionary*\n\nNotes:\n* You might want to use the more flexible `get_interface()` method (see further below) instead.\n\n#### peers\n\n*Returns attributes and values (including wgconfig-internal ones) of all peers as a nested dictionary*\n\nNotes:\n* You might want to use the more flexible `get_peers()` method (see further below) instead.\n\n### Methods for interaction\n\n#### `__init__(file)`\n\n*Initializes the instance*\n\nParameters:\n* \"file\" (str): Path of the WireGuard configuration file\n    You may also just provide the interface name. In this case, the path '/etc/wireguard' is assumed along with a file extension '.conf'.\n\nExamples:\n* `wc = wgconfig.WGConfig('wg0')`\n* `wc = wgconfig.WGConfig('/etc/wireguard/wg0.conf')`\n\n#### `read_file()`\n\n*Reads the WireGuard config file from disk into memory*\n        \n#### `write_file(file)`\n\n*Writes a WireGuard config file from memory to file*\n      \nParameters:\n* \"file\" (str, optional, default: None): Path of the WireGuard configuration file\n    You may also just provide the interface name. In this case the path '/etc/wireguard' is assumed along with a file extension '.conf'.\n    In case the parameter is missing, the config file defined on object initialization is used.\n\nExamples:\n* `wc.write_file()`\n* `wc.write_file('wg0')`\n* `wc.write_file('/etc/wireguard/wg0.conf')`\n\n#### `initialize_file(leading_comment)`\n\n*Empties the file and adds the interface section header*\n\nParameters:\n* \"leading_comment\" (str, optional, default: None): Comment line to be added before the Interface section. Must start with a '#' to indicate a comment.\n\nExamples:\n* `wc.initialize_file()`\n* `wc.initialize_file('# Here comes the Interface section:')`\n\n#### `get_interface(include_details)`\n\n*Returns a dictionary of the attributes and values of the interface section*\n\nParameters:\n* \"include_details\" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).\n\nExamples:\n* `ifdata = wc.get_interface()`\n\n#### `get_peers(keys_only, include_disabled, include_details)`\n\n*Returns a list of peers or - if selected - a dictionary including peers' data*\n\nParameters:\n* \"keys_only\" (boolean, optional, default: True): Return only the public keys as a list or return keys and corresponding data as a dictionary.\n* \"include_disabled\" (boolean, optional, default: False): Also return data of disabled peers.\n* \"include_details\" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).\n\nExamples:\n* `peers = wc.get_peers()`\n* `peerdata = wc.get_peers(keys_only=False)`\n\n#### `get_peer(key, include_details)`\n\n*Returns the data of the peer with the given (public) key*\n\nParameters:\n* \"key\" (str): Public key of the peer\n* \"include_details\" (boolean, optional, default: False): Also include attributes with a leading underscore (e.g. the disabled state or the raw data).\n\nExamples:\n* `peerdata = wc.get_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n* `peerdata = wc.get_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', include_details=True)`\n\nNotes:\n* Don't forget to call `read_file()` before attempting to get data out of a file\n* Access the `peers` property if you want to retrieve the data of all peers    \n\n#### `add_peer(key, leading_comment)`\n\n*Adds a new peer with the given (public) key*\n\nParameters:\n* \"key\" (str): Public key of the new peer\n* \"leading_comment\" (str, optional, default: None): Comment line to be added before the Peer section. Must start with a '#' to indicate a comment.\n\nExamples:\n* `wc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n* `wc.add_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', '# Here comes the Interface section:')`\n\n#### `del_peer(key)`\n\n*Removes the peer with the given (public) key*\n\nNote: Comment lines immediately before the Peer section are removed, too.\n\nParameters:\n* \"key\" (str): Public key of the peer\n\nExamples:\n* `wc.del_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n\n#### `add_attr(key, attr, value, leading_comment, append_as_line)`\n\n*Adds an attribute/value pair to the given peer ('None' for adding an interface attribute)*\n\nParameters:\n* \"key\" (str): Key of the peer. Set to 'None' to denote the Interface section\n* \"attr\" (str) Name of the attribute to add\n* \"value\" (str or int) Value of the attribute to add\n* \"leading_comment\" (str, optional, default: None): Comment line to be added before the Peer section. Must start with a '#' to indicate a comment.\n* \"append_as_line\" (bool, optional, default: False): Whether to add the attribute as a new line if another attribute with the same name already exists. If \"False\", adding an attribute that already exists results in comma-separated attribute values. This way, \"AllowedIPs\" can be added one by one.\n\nExamples:\n* `wc.add_attr(None, 'ListenPort', '51820')`\n* `wc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0')`\n* `wc.add_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0', '# Allow all IPv4 addresses', append_as_line=True)`\n\n#### `del_attr(self, key, attr, value, remove_leading_comments)`\n\n*Removes an attribute/value pair from the given peer ('None' for adding an interface attribute); set 'value' to 'None' to remove all values*\n\nParameters:\n* \"key\" (str): Key of the peer. Set to 'None' to denote the Interface section\n* \"attr\" (str) Name of the attribute to remove\n* \"value\" (str or int, optional, default: None) Value of the attribute to remove\n    Set to 'None' if all values (either comma-separated or is multiple attribute lines) shall be removed. Otherwise specify the specific value to be removed.\n* \"remove_leading_comments\" (bool, optional, default: True): Indicates whether comment lines before the attribute line(s) shall be removed, too\n\nExamples:\n* `wc.del_attr(None, 'ListenPort')`\n* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs')`\n* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0')`\n* `wc.del_attr('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=', 'AllowedIPs', '0.0.0.0/0', remove_leading_comments=False)`\n\n#### `disable_peer(self, key)`\n\n*Disables the peer with the given (public) key by prepending `#!` to all lines in a peer section*\n\nParameters:\n* \"key\" (str): Public key of the peer\n\nExamples:\n* `wc.disable_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n\n#### `enable_peer(self, key)`\n\n*Enables the peer with the given (public) key by removing `#!` from all lines in a peer section*\n\nParameters:\n* \"key\" (str): Public key of the peer\n\nExamples:\n* `wc.enable_peer('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n\n#### `get_peer_enabled(self, key)`\n\n*Checks whether the peer with the given (public) key is enabled*\n\nParameters:\n* \"key\" (str): Public key of the peer\n\nExamples:\n* `wc.get_peer_enabled('801mgm2JhjTOCxfihEknzFJGYxDvi+8oVYBrWe3hOWM=')`\n\n---\n\n## Reporting bugs\n\nIn case you encounter any bugs, please report the expected behavior and the actual behavior so that the issue can be reproduced and fixed.\n\n---\n## Developers\n\n### Clone repository\n\nClone this repo to your local machine using `https://github.com/towalink/wgconfig.git`\n\nInstall the module temporarily to make it available in your Python installation:\n```shell\npip3 install -e <path to root of \"src\" directory>\n```\n\n### Run unit tests\n\nCall \"pytest\" to run the unit tests:\n```shell\npytest <path to root of \"test\" directory>\n```\n\n---\n\n## License\n\n[![License](http://img.shields.io/:license-agpl3-blue.svg?style=flat-square)](https://opensource.org/licenses/AGPL-3.0)\n\n- **[AGPL3 license](https://opensource.org/licenses/AGPL-3.0)**\n- Copyright 2020-2023 \u00a9 <a href=\"https://github.com/towalink/wgconfig\" target=\"_blank\">Dirk Henrici</a>.\n- [WireGuard](https://www.wireguard.com/) is a registered trademark of Jason A. Donenfeld.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "parsing and writing WireGuard configuration files",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://www.github.com/towalink/wgconfig",
        "PyPi": "https://pypi.org/project/wgconfig/",
        "Repository": "https://www.github.com/towalink/wgconfig"
    },
    "split_keywords": [
        "wireguard",
        "configuration",
        "config",
        "wg"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd51b909c0e7ba2f5986f3011e175e908d99fd90fb99f105b85280465185c958",
                "md5": "9599a283f847e696d0843d11d2e68a2b",
                "sha256": "0b85867a921582125f5974cc844f336ed4cc7dcf3e612114a4d3c0686c454a4b"
            },
            "downloads": -1,
            "filename": "wgconfig-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9599a283f847e696d0843d11d2e68a2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.7",
            "size": 21491,
            "upload_time": "2024-01-30T20:34:05",
            "upload_time_iso_8601": "2024-01-30T20:34:05.754374Z",
            "url": "https://files.pythonhosted.org/packages/bd/51/b909c0e7ba2f5986f3011e175e908d99fd90fb99f105b85280465185c958/wgconfig-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa9fe408e5c04f7a92cb6de206a64a7bd1d291a611969bca469fed743f38de35",
                "md5": "d1a1d2ec150dd58b740831b681845ad3",
                "sha256": "62066ec00b6fb33b8c06de9e734149b769b8d83275f7989bf0b915be0ecbf32a"
            },
            "downloads": -1,
            "filename": "wgconfig-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d1a1d2ec150dd58b740831b681845ad3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7",
            "size": 23959,
            "upload_time": "2024-01-30T20:34:11",
            "upload_time_iso_8601": "2024-01-30T20:34:11.012125Z",
            "url": "https://files.pythonhosted.org/packages/aa/9f/e408e5c04f7a92cb6de206a64a7bd1d291a611969bca469fed743f38de35/wgconfig-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 20:34:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "towalink",
    "github_project": "wgconfig",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "wgconfig"
}
        
Elapsed time: 0.19863s