I've got some suggestions which may be useful and can help make it more secure.
- The "random.choice()" used here may be considered vulnerable because the "random" module is not suitable for cryptographic operations as it is not cryptographically secure.
Adopting "os.urandom" or functions from the 'secrets' module may be a feasible solution.
- The default iteration for pbkdf2 should be at least 10000, while the current default iteration here is only 1000.
You can increase the iteration to at least 10000 to fix it.