{"id":15009906,"url":"https://github.com/cyrbil/python_keepass_http","last_synced_at":"2025-10-08T18:11:17.802Z","repository":{"id":62573890,"uuid":"166071323","full_name":"cyrbil/python_keepass_http","owner":"cyrbil","description":"Client for KeePassHTTP to fetch and edit credentials from Python","archived":false,"fork":false,"pushed_at":"2020-10-10T15:41:00.000Z","size":63,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T19:51:32.959Z","etag":null,"topics":["keepass","keepasshttp","password","password-manager","python","python2","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyrbil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-16T16:19:07.000Z","updated_at":"2023-09-08T17:49:22.000Z","dependencies_parsed_at":"2022-11-03T18:30:56.925Z","dependency_job_id":null,"html_url":"https://github.com/cyrbil/python_keepass_http","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fpython_keepass_http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fpython_keepass_http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fpython_keepass_http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fpython_keepass_http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyrbil","download_url":"https://codeload.github.com/cyrbil/python_keepass_http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083390,"owners_count":21045088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keepass","keepasshttp","password","password-manager","python","python2","python3"],"created_at":"2024-09-24T19:29:05.402Z","updated_at":"2025-10-08T18:11:12.765Z","avatar_url":"https://github.com/cyrbil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeePassHTTP\r\n\r\n[![pypi_version.svg][pypi_version.svg]][pypi_project.url]\r\n[![pypi_status.svg][pypi_status.svg]][pypi_project.url]\r\n[![pypi_format.svg][pypi_format.svg]][pypi_project.url]\r\n[![python_versions.svg][python_versions.svg]][pypi_project.url]\r\n[![license.svg][license.svg]][license.url]\r\n[![Maintainability][maintainability.svg]][maintainability.url]\r\n[![travis_build.svg][travis_build.svg]][travis.url]\r\n[![codecov.svg][codecov.svg]][codecov.url]\r\n[![requirements_status.svg][requirements_status.svg]][requires.url]\r\n[![code_size.svg][code_size.svg]][pypi_project.url]\r\n[![pypi_downloads.svg][pypi_downloads.svg]][pypi_project.url]\r\n\r\n\r\nPython client for [KeePassHTTP][keepasshttp.url] to interact with [KeePass][keepass.url]'s credentials.\r\n\r\n\r\n## Install\r\n\r\n    $ pip install keepasshttp\r\n\r\n\r\n## Usage\r\n\r\n    import keepasshttp\r\n\r\n    # get single credential\r\n    credential = keepasshttp.get(\"my_credential_name_or_url\")\r\n    print(credential.login)\r\n    print(credential.password)\r\n\r\n    # find all credentials's name\r\n    credentials = keepasshttp.list()\r\n\r\n    # fetch all partiall matching credentials\r\n    credentials = keepasshttp.search(\"my_credential_name_or_url\")\r\n\r\n    # create a new keepasshttp entry\r\n    keepasshttp.create(\"login\", \"password\", \"url\")\r\n\r\n    # update a keepasshttp entry\r\n    credential.password = \"new password\"\r\n    # or\r\n    keepasshttp.update(\"login\", \"password\", \"url\", \"uuid\")\r\n\r\n\r\n## Command line\r\n\r\nKeePassHTTP can also be called from command line:\r\n\r\n\r\n    $ python -m keepasshttp --help\r\n    usage: keepasshttp [-h] [-c CONFIG_PATH] [-u URL]\r\n                   [-f {python,text,table,json,csv}]\r\n                   credential [credential ...]\r\n\r\n    Fetch credentials from keepass\r\n\r\n    positional arguments:\r\n      credential            Url or name to match credentials from keepass database\r\n\r\n    optional arguments:\r\n      -h, --help            show this help message and exit\r\n      -c CONFIG_PATH, --config CONFIG_PATH\r\n                            alternative path for keepasshttp's AES exchange key\r\n                            (default: ~/.python_keepass_http)\r\n      -u URL, --url URL     alternative url for keepasshttp server (default:\r\n                            'http://localhost:19455/')\r\n      -f {python,text,table,json,csv}, --format {python,text,table,json,csv}\r\n                            output format for credentials\r\n\r\n    $ python -m keepathhttp my_credential_name_or_url\r\n    my_credential_name_or_url\r\n      - login: login\r\n      - password: password\r\n      - name: test\r\n      - url: my_credential_name_or_url\r\n      - id: ABCDEF1234567890ABCDEF1234567890\r\n      - fields: []\r\n\r\n\r\n## Configuration\r\n\r\nBy default, this module will write AES association key to `~/.python_keepass_http`\r\nand use `http://localhost:19455/` to connect to the [KeePassHTTP][keepasshttp.url] server.\r\n\r\nTo change theses parameters, instantiate `keepasshttp.KeePassHTTP` class with different values.\r\n\r\n    from keepasshttp import KeePassHTTP\r\n    kph = KeePassHTTP(\r\n        storage=\"./keepasshttp_key\",\r\n        url=\"https://example.com:1337/\")\r\n    kph.get(\"...\")\r\n    ...\r\n\r\n\r\n## Testing\r\n\r\nYou can simply run the tests using:\r\n\r\n    python -m unittest discover\r\n\r\n`KeePassHTTP` calls are mocked, to run the tests against a real server, you need to:\r\n\r\n   - open `tests/test_database.kdbx` in `KeePass` password is `test`\r\n   - set `TEST_WITH_KEEPASS` environment variable\r\n   - run test normally\r\n\r\n\r\n## Coverage\r\n\r\nTo run tests with coverage:\r\n\r\n    pip install pytest-cov\r\n    pytest --cov\r\n\r\n\r\n[comment]: # (Urls references)\r\n[pypi_project.url]: https://pypi.org/project/keepasshttp/\r\n[license.url]: ./LICENSE.txt\r\n[travis.url]: https://travis-ci.org/cyrbil/python_keepass_http\r\n[codecov.url]: https://codecov.io/github/cyrbil/python_keepass_http\r\n[requires.url]: https://requires.io/github/cyrbil/python_keepass_http/requirements/?branch=master\r\n[keepasshttp.url]: https://github.com/pfn/keepasshttp\r\n[keepass.url]: https://keepass.info/\r\n[maintainability.url]: https://codeclimate.com/github/cyrbil/python_keepass_http/maintainability\r\n\r\n[comment]: # (Images references)\r\n[pypi_version.svg]: https://img.shields.io/pypi/v/keepasshttp.svg \"PYPI KeePassHTTP\"\r\n[pypi_status.svg]: https://img.shields.io/pypi/status/keepasshttp.svg \"PYPI KeePassHTTP\"\r\n[pypi_format.svg]: https://img.shields.io/pypi/format/keepasshttp.svg \"PYPI KeePassHTTP\"\r\n[python_versions.svg]: https://img.shields.io/pypi/pyversions/keepasshttp.svg \"PYPI KeePassHTTP\"\r\n[license.svg]: https://img.shields.io/github/license/cyrbil/python_keepass_http.svg \"MIT\"\r\n[travis_build.svg]: https://img.shields.io/travis/cyrbil/python_keepass_http/master.svg \"travis.org\"\r\n[codecov.svg]: https://codecov.io/github/cyrbil/python_keepass_http/coverage.svg?branch=master \"codecov.io\"\r\n[requirements_status.svg]: https://img.shields.io/requires/github/cyrbil/python_keepass_http.svg \"requires.io\"\r\n[code_size.svg]: https://img.shields.io/github/languages/code-size/cyrbil/python_keepass_http.svg \"All files\"\r\n[pypi_downloads.svg]: https://img.shields.io/pypi/dm/keepasshttp.svg \"PYPI KeePassHTTP\"\r\n[maintainability.svg]: https://api.codeclimate.com/v1/badges/9aa1b086f9dde4d1e23d/maintainability\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrbil%2Fpython_keepass_http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrbil%2Fpython_keepass_http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrbil%2Fpython_keepass_http/lists"}