# Neon Users Service
This module manages access to a pluggable user database backend. By default, it
operates as a standalone module using SQLite as the persistent data store.
## Configuration
Configuration may be passed directly to the `NeonUsersService` constructor,
otherwise it will read from a config file using `ovos-config`. The configuration
file will be `~/.config/neon/diana.yaml` by default. An example valid configuration
is included:
```yaml
neon_users_service:
module: sqlite
sqlite:
db_path: ~/.local/share/neon/user-db.sqlite
```
`module` defines the backend to use and a config key matching that backend
will specify the kwargs passed to the initialization of that module.
## MQ Integration
The `mq_connector` module provides an MQ entrypoint to services and is the
primary method of interaction with this service. Valid requests are detailed
below. Responses will always follow the form:
```yaml
success: False
error: <string description>
```
```yaml
success: True
user: <serialized User object>
```
### Create
Create a new user by sending a request with the following parameters:
```yaml
operation: create
username: <new_username>
password: <new_password>
user: <Optional serialized User object, else default will be created>
```
### Read
Read an existing user. If `password` is not supplied, then the returned User
object will have the `password_hash` and `tokens` config redacted.
```yaml
operation: read
username: <existing_username>
password: <existing_password>
```
### Update
Update an existing user. If a `password` is supplied, it will replace the
user's current password. If no `password` is supplied and `user.password_hash`
is updated, the database entry will be updated with that new value.
```yaml
operation: update
username: <existing_username>
password: <optional new password>
user: <updated User object>
```
### Delete
Delete an existing user. This requires that the supplied `user` object matches
an entry in the database exactly for validation.
```yaml
operation: delete
username: <username_to_delete>
user: <User object to delete>
```
___
### Licensing
This project is free to use under the
[GNU Affero General Public License](https://www.gnu.org/licenses/why-affero-gpl.html).
Contact info@neon.ai for commercial licensing options.
Raw data
{
"_id": null,
"home_page": "https://github.com/NeonGeckoCom/neon-users-service",
"name": "neon-users-service",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Neongecko",
"author_email": "developers@neon.ai",
"download_url": "https://files.pythonhosted.org/packages/af/71/9e8c9b6ec6ddd11eca8572f8df3becb92810b3786ef49d29cecb56dc9ccd/neon-users-service-0.0.1a3.tar.gz",
"platform": null,
"description": "# Neon Users Service\nThis module manages access to a pluggable user database backend. By default, it\noperates as a standalone module using SQLite as the persistent data store.\n\n## Configuration\nConfiguration may be passed directly to the `NeonUsersService` constructor,\notherwise it will read from a config file using `ovos-config`. The configuration\nfile will be `~/.config/neon/diana.yaml` by default. An example valid configuration\nis included:\n\n```yaml\nneon_users_service:\n module: sqlite\n sqlite:\n db_path: ~/.local/share/neon/user-db.sqlite\n```\n\n`module` defines the backend to use and a config key matching that backend\nwill specify the kwargs passed to the initialization of that module.\n\n## MQ Integration\nThe `mq_connector` module provides an MQ entrypoint to services and is the\nprimary method of interaction with this service. Valid requests are detailed\nbelow. Responses will always follow the form:\n\n```yaml\nsuccess: False\nerror: <string description>\n```\n\n```yaml\nsuccess: True\nuser: <serialized User object>\n```\n\n### Create\nCreate a new user by sending a request with the following parameters:\n```yaml\noperation: create\nusername: <new_username>\npassword: <new_password>\nuser: <Optional serialized User object, else default will be created>\n```\n\n### Read\nRead an existing user. If `password` is not supplied, then the returned User\nobject will have the `password_hash` and `tokens` config redacted.\n```yaml\noperation: read\nusername: <existing_username>\npassword: <existing_password>\n```\n\n### Update\nUpdate an existing user. If a `password` is supplied, it will replace the\nuser's current password. If no `password` is supplied and `user.password_hash` \nis updated, the database entry will be updated with that new value.\n\n```yaml\noperation: update\nusername: <existing_username>\npassword: <optional new password>\nuser: <updated User object>\n```\n\n### Delete\nDelete an existing user. This requires that the supplied `user` object matches\nan entry in the database exactly for validation.\n```yaml\noperation: delete\nusername: <username_to_delete>\nuser: <User object to delete>\n```\n\n___\n### Licensing\nThis project is free to use under the \n[GNU Affero General Public License](https://www.gnu.org/licenses/why-affero-gpl.html).\nContact info@neon.ai for commercial licensing options.\n",
"bugtrack_url": null,
"license": "AGPL-3.0-only",
"summary": "Neon User Management Module",
"version": "0.0.1a3",
"project_urls": {
"Homepage": "https://github.com/NeonGeckoCom/neon-users-service"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1ac1833a76b0cbb298a151ec38ee66859862ef3aeda6dd544743dedd61d868e0",
"md5": "03c00be5e92daba0b0d9410ac3a44de0",
"sha256": "2a0ddc7112f916eb2ed0c6edb3aa1023cef123275ca6764af81773b6d10028b2"
},
"downloads": -1,
"filename": "neon_users_service-0.0.1a3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "03c00be5e92daba0b0d9410ac3a44de0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 26719,
"upload_time": "2025-02-06T21:28:54",
"upload_time_iso_8601": "2025-02-06T21:28:54.979417Z",
"url": "https://files.pythonhosted.org/packages/1a/c1/833a76b0cbb298a151ec38ee66859862ef3aeda6dd544743dedd61d868e0/neon_users_service-0.0.1a3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "af719e8c9b6ec6ddd11eca8572f8df3becb92810b3786ef49d29cecb56dc9ccd",
"md5": "f7aa7d673f834a0045edbfccc94705ff",
"sha256": "bf933e21d01d9fd36b87e45e6fe0d6e4dc239a5fbdbc25f6b2312b2872ab50fc"
},
"downloads": -1,
"filename": "neon-users-service-0.0.1a3.tar.gz",
"has_sig": false,
"md5_digest": "f7aa7d673f834a0045edbfccc94705ff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22018,
"upload_time": "2025-02-06T21:28:56",
"upload_time_iso_8601": "2025-02-06T21:28:56.848327Z",
"url": "https://files.pythonhosted.org/packages/af/71/9e8c9b6ec6ddd11eca8572f8df3becb92810b3786ef49d29cecb56dc9ccd/neon-users-service-0.0.1a3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-06 21:28:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NeonGeckoCom",
"github_project": "neon-users-service",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "neon-users-service"
}