-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pykeepass_cache library #40
Comments
Thanks for letting me know! I'll definitely try it out when I get a chance. I've always been a little frustrated with the opening delay. |
I'm having a chicken/egg problem. pykeepass_cache requires the password, but I typically prompt for the password only if the database isn't already open. So how can I supply the password to pykeepass_cache if the server is already running without prompting for it? The goal is to open the database on first run, prompting for the password if necessary but then being able to re-open keepmenu without the password as long as the timeout hasn't been reached. |
Use the cached_databases function to check if the database is already open
on the server.
…On Aug 28, 2019 12:35 PM, "Scott Hansen" ***@***.***> wrote:
I'm having a chicken/egg problem. pykeepass_cache requires the password,
but I typically prompt for the password only if the database isn't already
open. So how can I supply the password to pykeepass_cache if the server is
already running without prompting for it? The goal is to open the database
on first run, prompting for the password if necessary but then being able
to re-open keepmenu without the password as long as the timeout hasn't been
reached.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#40?email_source=notifications&email_token=ABJT7YK6XLFTA2XEUHPDK5TQG2ZMLA5CNFSM4IP744PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5L4LOA#issuecomment-525845944>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJT7YJ2UL2EILUPSDZFD6LQG2ZMLANCNFSM4IP744PA>
.
|
Sigh. Sorry. Dumb question. A request: would it be possible to add a method/call to shut down the server (close the database)? |
Few more things after testing for awhile:
|
How many entries are in that database? My database with 100 entries takes about 100ms.
That happens when you access del kpo
kpo = PyKeePass('test.kdbx', 'password', 'test.key')
I haven't seen this. Can you post some example code? |
725 In ipython:
It actually appears that the processing and printing are very fast, but there is a significant delay after the printing completes before the entire command finishes.
To reproduce both these in ipython (ensure no existing db instances are open):
Running it a second time in a row:
It also appears that the server instance is staying running in the background |
The first issue with
It seems to work for me import subprocess
from pykeepass_cache import PyKeePass
import time
print('-------------- server running, socket should exist ------------------')
kp = PyKeePass('test3.kdbx', 'password', 'test3.key', timeout=5)
print(subprocess.run('lsof /tmp/pykeepass.sock', shell=True))
time.sleep(6)
print('-------------- server not running, socket should not exist ------------------')
print(subprocess.run('lsof /tmp/pykeepass.sock', shell=True))
|
I've been working on a library that transparently wraps pykeepass and temporarily holds a database open in a background process. I thought it might be useful for keepmenu.
Also any feedback would be appreciated.
The text was updated successfully, but these errors were encountered: