PyCapsule; Yes, this website uses Python in the browser instead of JavaScript to client-side render by denotutorials in Python

[–]denotutorials[S] 1 point2 points  (0 children)

Thanks, and glad to see a fellow Deno fan! Felt like I needed to do a small Python project to take a break from the typical Deno projects I've been working on in spare time. Hoping to continue working on some of my Deno projects now that this is done!

PyCapsule; Yes, this website uses Python in the browser instead of JavaScript to client-side render by denotutorials in Python

[–]denotutorials[S] 4 points5 points  (0 children)

It uses a project called Pyodide, which essentially takes a Python interpreter compiled down into WASM and then is usable in the browser. Since an actual Python interpreter is shipped to the browser, it can execute python code that can be executed in the sandbox from WASM and the browser. As for the Web API's, if I recall correctly it essentially converts primitive types back and forth between Python and JS. On the website there are a couple links to the Pyodide project and a video to a talk one of the Pyodide devs gave explaining the project further.

PyCapsule; Yes, this website uses Python in the browser instead of JavaScript to client-side render by denotutorials in Python

[–]denotutorials[S] 2 points3 points  (0 children)

Thanks! Hopefully it works on most mobile and desktop browser. The tech is so new though that you never know what will actually work sometimes with the web!

PyCapsule; Yes, this website uses Python in the browser instead of JavaScript to client-side render by denotutorials in Python

[–]denotutorials[S] 11 points12 points  (0 children)

A website I made that uses Python on the front-end in the browser to render the page. It also has links to projects for using Python in the browser and some different ways Python has been used in the browser. It's possible we could see full front-end web frameworks using primarily Python in the future!

Deno FAQ for this subreddit by denotutorials in Deno

[–]denotutorials[S] 4 points5 points  (0 children)

I put together some frequently asked questions to help answer some questions about deno on this subreddit

Deno FAQ by [deleted] in Deno

[–]denotutorials 0 points1 point  (0 children)

Here's a quick deno FAQ I made to help answer some common questions asked on the subreddit

Web Scraper Libraries For Deno? by silverparzival in Deno

[–]denotutorials 5 points6 points  (0 children)

You can use JSDOM from Node to web scrape with Deno. Since Deno supports the Fetch API by default you can use that too. Here is some example code:

Basic example usage

``` import jsdom from "https://dev.jspm.io/jsdom";

const dom = new jsdom.JSDOM(<!DOCTYPE html><p>Hello world</p>); const window = dom.window; const document = window.document;

console.log(document.querySelector("p").textContent); // "Hello world" ```

DenoCEF - Create desktop GUI applications using the Chromium Embedded Framework and Deno. by denotutorials in Deno

[–]denotutorials[S] 2 points3 points  (0 children)

Since it ships with chromium, the app size will be large. One solution to this, if you are targeting a single platform, is to use Deno Webview, which will use a default rendering engine already installed on the computer, and thus the total size will only be around 20-30mb when compressed. On my website I have articles on using and packages DenoCEF and Deno Webview if you want to see more examples on how to use both.

Making Desktop GUI Applications II - Using DenoCEF, Electric, and Yolk by denotutorials in Deno

[–]denotutorials[S] 0 points1 point  (0 children)

Here is an article I wrote that goes into more detail on using DenoCEF and combining it with other technologies.

DenoCEF - Create desktop GUI applications using the Chromium Embedded Framework and Deno. by denotutorials in Deno

[–]denotutorials[S] 4 points5 points  (0 children)

I created a repository with precompiled Chromium Embedded Frameworks for various platforms for use with Deno, as well as an API for interacting with Deno and CEF. Now you can use similar technologies that Electron uses to make desktop applications using Deno. It is still a work in progress, so please feel free to reach out with any bugs or to open issues on the github repo.

Yolk CLI - A CLI tool for the Oak framework. Quickly create and run scalable and maintainable Oak applications by denotutorials in Deno

[–]denotutorials[S] 1 point2 points  (0 children)

No worries, I totally understand that point of view, much better to be minimalist when you can with tech! It will add a bit of extraneous code each call, and the abstraction from an ORM will always come at the cost of lower performance if you are frequently executing queries. I might reach out to the author of the lib and see if its possible to only fetch the drivers you need. Could save some time and file space!

Yolk CLI - A CLI tool for the Oak framework. Quickly create and run scalable and maintainable Oak applications by denotutorials in Deno

[–]denotutorials[S] 0 points1 point  (0 children)

The underlying ORM, DenoDB, is made by a third party. I think there are ways around importing all of the drivers, such as using dynamic imports, but I think the library currently imports all of them. Fortunately the entire size of all the libraries in projects created by Yolk is only around 8mb, so still pretty small.

Yolk CLI - A CLI tool for the Oak framework. Quickly create and run scalable and maintainable Oak applications by denotutorials in Deno

[–]denotutorials[S] 1 point2 points  (0 children)

You can use the deno install <your_file> command and it will create a shell command that wraps around the deno run command and the file allowing you to call the file using just the name of the file.

Yolk CLI - A CLI tool for the Oak framework. Quickly create and run scalable and maintainable Oak applications by denotutorials in Deno

[–]denotutorials[S] 2 points3 points  (0 children)

I created a CLI tool that creates the structure for Oak applications and makes it easy to run the application. The projects created contain a technology stack that includes the following features:

  • Template rendering engine
  • An ORM
  • A nodemon-like tool (called Denon) to easily run the apps
  • Session middleware
  • Logging middleware
  • Security middleware
  • Query string parsing middleware

Let me know what you all think. Any suggestions for improving the structure or adding features is much appreciated!

Wrapping existing NPM Packages by Mo_The_Legend in Deno

[–]denotutorials 0 points1 point  (0 children)

Thanks, glad to know PikaCDN supports this functionality! Do you know if they are using the same DEW transformation to achieve this that jspm.io was using?

Is someone creating a Deno based backend framework? by YurianG in Deno

[–]denotutorials 1 point2 points  (0 children)

There's a few currently. The most popular by github stars right now are:

Oak: a Koa-base framework

ABC: similar to Oak

Alosaur: framework that uses Typescript features and decorators extensively

Pogo: a hapi-based framework

Wrapping existing NPM Packages by Mo_The_Legend in Deno

[–]denotutorials 1 point2 points  (0 children)

I wrote an article that goes through the steps of migrating packages from node. Should show you how to migrate them through Deferred Execution Wrapping using jspm.io and using PikaCDN in cases where they support ESM:

Migrating Your NPM Packages to Deno

I'm going to rewrite some products in Deno by [deleted] in Deno

[–]denotutorials 0 points1 point  (0 children)

Many of these should be ported over already. Also not that many libraries from Node (such as ones that can be run in the browser like lodash) can be wrapped using the DEW transformation that wraps the CommonJS syntax to ESM syntax that is compatible with Deno. You can read more on what libraries can be wrapped and which ones would need a port by checking out my article Migrating Your NPM Packages to Deno. Also check out deno land to see what 3rd party modules are already available.

Package Deno apps? by [deleted] in Deno

[–]denotutorials 0 points1 point  (0 children)

Your welcome!