# datasette-packages
[![PyPI](https://img.shields.io/pypi/v/datasette-packages.svg)](https://pypi.org/project/datasette-packages/)
[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-packages?include_prereleases&label=changelog)](https://github.com/simonw/datasette-packages/releases)
[![Tests](https://github.com/simonw/datasette-packages/workflows/Test/badge.svg)](https://github.com/simonw/datasette-packages/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-packages/blob/main/LICENSE)
Show a list of currently installed Python packages
## Installation
Install this plugin in the same environment as Datasette.
$ datasette install datasette-packages
## Usage
Visit `/-/packages` to see a list of installed Python packages.
Visit `/-/packages.json` to get that back as JSON.
## Demo
The output of this plugin can be seen here:
- https://latest-with-plugins.datasette.io/-/packages
- https://latest-with-plugins.datasette.io/-/packages.json
## With datasette-graphql
if you have version 2.1 or higher of the [datasette-graphql](https://datasette.io/plugins/datasette-graphql) plugin installed you can also query the list of packages using this GraphQL query:
```graphql
{
packages {
name
version
}
}
```
[Demo of this query](https://latest-with-plugins.datasette.io/graphql?query=%7B%0A%20%20packages%20%7B%0A%20%20%20%20name%0A%20%20%20%20version%0A%20%20%7D%0A%7D).
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-packages
python3 -mvenv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Raw data
{
"_id": null,
"home_page": "https://github.com/simonw/datasette-packages",
"name": "datasette-packages",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Simon Willison",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/30/4a/eced59667884c4cb5260ea1e77ff75d87383afb7a694f5669d4cc89dcdcb/datasette-packages-0.2.1.tar.gz",
"platform": null,
"description": "# datasette-packages\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-packages.svg)](https://pypi.org/project/datasette-packages/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-packages?include_prereleases&label=changelog)](https://github.com/simonw/datasette-packages/releases)\n[![Tests](https://github.com/simonw/datasette-packages/workflows/Test/badge.svg)](https://github.com/simonw/datasette-packages/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-packages/blob/main/LICENSE)\n\nShow a list of currently installed Python packages\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n $ datasette install datasette-packages\n\n## Usage\n\nVisit `/-/packages` to see a list of installed Python packages.\n\nVisit `/-/packages.json` to get that back as JSON.\n\n## Demo\n\nThe output of this plugin can be seen here:\n\n- https://latest-with-plugins.datasette.io/-/packages\n- https://latest-with-plugins.datasette.io/-/packages.json\n\n## With datasette-graphql\n\nif you have version 2.1 or higher of the [datasette-graphql](https://datasette.io/plugins/datasette-graphql) plugin installed you can also query the list of packages using this GraphQL query:\n\n```graphql\n{\n packages {\n name\n version\n }\n}\n```\n[Demo of this query](https://latest-with-plugins.datasette.io/graphql?query=%7B%0A%20%20packages%20%7B%0A%20%20%20%20name%0A%20%20%20%20version%0A%20%20%7D%0A%7D).\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n cd datasette-packages\n python3 -mvenv venv\n source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n pip install -e '.[test]'\n\nTo run the tests:\n\n pytest\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "Show a list of currently installed Python packages",
"version": "0.2.1",
"project_urls": {
"CI": "https://github.com/simonw/datasette-packages/actions",
"Changelog": "https://github.com/simonw/datasette-packages/releases",
"Homepage": "https://github.com/simonw/datasette-packages",
"Issues": "https://github.com/simonw/datasette-packages/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2765fbb0ef56cba0c9857d6fd5efbb1d5098525ca8ab91f608378715fab1c08a",
"md5": "a31411875f58a3b85a2efa933f2c8ffb",
"sha256": "ffcc9fa136425589b3cac04eadbff5917b6f3b7f62f71aa8c7da72ae2ef93bfb"
},
"downloads": -1,
"filename": "datasette_packages-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a31411875f58a3b85a2efa933f2c8ffb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7167,
"upload_time": "2024-03-16T01:19:42",
"upload_time_iso_8601": "2024-03-16T01:19:42.876747Z",
"url": "https://files.pythonhosted.org/packages/27/65/fbb0ef56cba0c9857d6fd5efbb1d5098525ca8ab91f608378715fab1c08a/datasette_packages-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "304aeced59667884c4cb5260ea1e77ff75d87383afb7a694f5669d4cc89dcdcb",
"md5": "8a6ac9efcb255cb5b9d21bc8f61cf0f9",
"sha256": "fafd4057b46bf3a91fab95afa92854e9eb74ef4098f73fb71b11fc073f9cbc7a"
},
"downloads": -1,
"filename": "datasette-packages-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "8a6ac9efcb255cb5b9d21bc8f61cf0f9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7192,
"upload_time": "2024-03-16T01:19:43",
"upload_time_iso_8601": "2024-03-16T01:19:43.882904Z",
"url": "https://files.pythonhosted.org/packages/30/4a/eced59667884c4cb5260ea1e77ff75d87383afb7a694f5669d4cc89dcdcb/datasette-packages-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-16 01:19:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simonw",
"github_project": "datasette-packages",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "datasette-packages"
}