@nickantonaccio @jshaffstall Thanks guys for the CORS heads-up and reminder! I wasn’t even thinking of it.
The tinyurl one might respond correctly if the proper headers are set in the HTTP request. I don’t have experience with that, though, but I suspect you’re right that looking at the Javascript library might shed some light on what headers to send.
Aha, at first look, it appears the JS code sends a request to https://cors-anywhere.herokuapp.com, which acts as a proxy to handle the CORS issues:
And it looks like they’re having some problems with abuse:
It’s kind of off-topic on my part but, still bring new to Anvil, I hadn’t thought of applying Server Uplinks to arbitrarily stout backends in your own data center (or home) until @nickantonaccio mentioned that usage (I think he did - I’ll reread). Maybe in the back of my mind I did briefly imagine it (only because I used to design data centers with Sun & Solaris back in the day), but not really here. And the docs I think allude to this ability. I have to review the comment and docs because it opens up possibilities (not to be abused and there are security considerations, too), but just as an option to be aware of.
Thanks.
This topic gets right to what I see at the beauty of the whole Anvil design: a built-in drag-drop GUI designer with full access to creating dynamic layouts in Python code and optional full access to HTML/CSS/JS to build front end interfaces, with some basic Python language functionality right there in the front end. The real benefit is the ability to connect so easily with the overwhelming majority of the real, full Python ecosystem in server modules, for anything that can’t be done in client code. Aside from the typical ‘web framework’ benefits (user management, database ORM, HTTP API endpoints, etc.), and lots of other built-ins (visual data table builder, Google, Stripe and other APIs, etc.), it’s the smooth integration between front end and that super powerful Python back end, just by putting functions in a module that lives on the server and passing native Python values as arguments. And if something can’t be loaded on Anvil servers, or if you want to control a robot, or a Pico W - or if you want to build your own data center backend
- there’s uplink. And it’s all implemented so cleanly and professionally, with a built-in IDE with autocomplete, GIT integration, etc. … plus it’s all neatly hosted and there’s the open source server to offer some safety … jeez, it’s just so good ![]()
Yes. It was a combination of a comment that you made, alongside a comment that @jshaffstall made at around the same time (further up) concerning why an Anvil module wasn’t available in a Client or Server Uplink context:
As I wondered what he meant, coupled with your “servers in a data-center” comment, it dawned on me that Uplinks are gateways to entend processing power into arbitrary environments (with security, bandwidth and other concerns to account for, of course). How beautifully extensible, I thought.
Now, to be clear, I had read the Uplink docs before - I absolutely did - but their purpose & power didn’t render to me until comments in this thread helped me tie it together.
I guess it’s because one of my first experiences with Anvil (probably the first), was trying to setup development in the CLI using Uplinks, since I’m used to vim(1), the ptpython(1) REPL, etc; and so my concept of Uplinks was that use-case, and not the more general understanding that I now have. ![]()