datasette-mask-columns-0.2.1
توضیحات
Datasette plugin that masks specified database columns
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | datasette-mask-columns-0.2.1 |
| نام | datasette-mask-columns |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Simon Willison |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/simonw/datasette-mask-columns |
| آدرس اینترنتی | https://pypi.org/project/datasette-mask-columns/ |
| مجوز | Apache License, Version 2.0 |
# datasette-mask-columns
[](https://pypi.org/project/datasette-mask-columns/)
[](https://github.com/simonw/datasette-mask-columns/releases)
[](https://github.com/simonw/datasette-mask-columns/actions?query=workflow%3ATest)
[](https://github.com/simonw/datasette-mask-columns/blob/main/LICENSE)
Datasette plugin that masks specified database columns
## Installation
pip install datasette-mask-columns
This depends on plugin hook changes in a not-yet released branch of Datasette. See [issue #678](https://github.com/simonw/datasette/issues/678) for details.
## Usage
In your `metadata.json` file add a section like this describing the database and table in which you wish to mask columns:
```json
{
"databases": {
"my-database": {
"plugins": {
"datasette-mask-columns": {
"users": ["password"]
}
}
}
}
}
```
All SQL queries against the `users` table in `my-database.db` will now return `null` for the `password` column, no matter what value that column actually holds.
The table page for `users` will display the text `REDACTED` in the masked column. This visual hint will only be available on the table page; it will not display his text for arbitrary queries against the table.
نیازمندی
| مقدار | نام |
|---|---|
| - | datasette |
| - | pytest |
| - | pytest-asyncio |
| - | httpx |
| - | sqlite-utils |
نحوه نصب
نصب پکیج whl datasette-mask-columns-0.2.1:
pip install datasette-mask-columns-0.2.1.whl
نصب پکیج tar.gz datasette-mask-columns-0.2.1:
pip install datasette-mask-columns-0.2.1.tar.gz