REST for local data

I am making my own login form and need to get users from my local web server
I could not find help. Please provide anvil documents page url for REST API use for local database.

Welcome to the forums.

Is your database local on your own private network, ie does it have an IP address of 192.168.x.x or 172.x.x.x ?

If it does, then you won’t be able to connect to it unless it has some form of external access. The Anvil apps sit on Anvil’s own AWS servers which mean they can only talk to other publicly accessible servers.

If it is on a publicly accessible server, then you can connect to it using PyMySQL (for MySQL) or psycog2 (for PostgreSQL). I believe there is a library for MS SQL as well but I don’t know what it is called.

1 Like

Yes, 192.168… MSSQL Server 2008 R2.

If i can make widgets/plugings/custom objects/embedding like something to use it in my local app then will it be possible to access local database on local network?

I was tired when I wrote my original reply, hence I didn’t mention that actually, you could run an uplink script on a PC inside your local network. That script would connect to the Anvil app. and the local database. That should work.

Read about uplink here :
https://anvil.works/docs/uplink

1 Like

Great! that is all i needed for now.