I'm excited to announce Oxygen.jl, a micro-framework built on top of the HTTP.jl library that's designed to simplify building web applications in J...
For further actions, you may consider blocking this person and/or reporting abuse
This is nice. The first thing that came to mind was this is Flask but for Julia and I'm happy I saw it in the post. Great work 😄
I'll try it out and if I find have any questions, I will ask
Looks cool, I too have wanted "FastAPI for Julia".
Same here, Jeremey Howard (creator of FastAI) has said many times that having things like FastAPI is critical for Julia's long term success so I am excited to see this!
I am so exited to see that Julia finally have a web server that does not heavily rely on global states! It feels much more "Julian" than existing frameworks.
By the way, I am very interested in how you implement the
@route
macro, because it does not seem obvious to me how to manipulate a function by its signature. In python it is done with a special annotation system, how do you do that in Julia?That's a great question! And one that was difficult for me to figure out as well. It involved a lot of googling and reading into the Base library documentation
Essentially, there's a low-level api just for methods that's pretty good at extracting useful information. I was able to extract the number of function arguments and their types, but was unable to get the name of each variable.
I found a snippet in the julia forums that did exactly what I needed and modified it a bit to return strings instead of symbols.
(get parameter names)
github.com/ndortega/Oxygen.jl/blob...
(get parameter types & count)
github.com/ndortega/Oxygen.jl/blob...
(low-level api)
docs.julialang.org/en/v1/base/base...
Great work! Looks almost as easy as the R Plumber framework. Almost, because Plumber automatically generates the Swagger description.
I have no idea about the amount of work that would be involved, but does an integration with the Genie/Stipple framework make any sense?
cool
so nice Nathan congrats on making an awesome package :)
Please add a benchmark :-)
to -> github.com/TechEmpower/FrameworkBe...
Very nice. Do you happen to know whether there's a templating engine (like Jinja for flask) that can be used in combination with Oxygen?
There's a package called Mustache.jl which is a generic templating engine. They should be compatible, but I haven't tested this yet. Let me know if you run into any issues.
github.com/jverzani/Mustache.jl
Neat 👍
Your motivation was the same as mine when I wrote Pages.jl. Have you seen it?
Up until now, I have not! But that's because the prototype I was working on a month ago was supposed to be a simple REST api with no front-end. I had no plans to add websockets to communicate with the browser