4 ms·
Congrats on shipping! I have a sqlite DB with historical Visa data, and I want to expose it as an API (like your software does), but with API key. Not a python
by justboxing 9y ago
Congrats on shipping!
I have a sqlite DB with historical Visa data, and I want to expose it as an API (like your software does), but with API key. Not a python user here, can you tell me about the following?
1. Is it possible to put some security behind the API? So only queries with a key can access it?
2. How would I host this API? Where would the SQLite DB reside?
3. I understand the API is read-only, which is great and works for my use case! Can I also do read-writes to the database from a separate application that will keep updating the database on a nightly basis?
- simonw 9y agoI've not considered authentication at all. If you do need that, my preferred option would be to put it behind a proxy such as nginx that can be configured to require authentication.
- malingo 9y agoI've had good luck with this library to use OpenID Connect with Nginx: https://github.com/pingidentity/lua-resty-openidc https://github.com/pingidentity/lua-resty-openidc
- toomuchtodo 9y agoYou would run this on the same VM or other compute as your SQLite database. You should still be able to perform scheduled updates (cron?) to the underlying SQLite database.
- technomalogical 9y agoThe database is opened immutably, so my guess is you’d either make a copy and update or regenerate it from another source (a la Simon’s CSV to sqlite tool. You could have a symlink that points to the current DB