Giter Club home page Giter Club logo

jslib's Introduction

The goal of this project is to be able to use parts of the Javascript Standard libraries in Python.

Why?

Having to maintain seperate codebases for the frontend and the backend of a webapplication, often doing many things in the exact same way (like validating User Input or manipulating HTML/XML/etc.), can be a big pain in the neck and there are several approaches to avoid such redundancy:

  1. Shared-Nothing Approach (not always feasible)
  2. Use Javascript for everything (having to live with its flaws)
  3. Use Python for everything (translating Python to Javascript)

There are multiple Transpilers for Python->JavaScript (Here is a nice article comparing them).

Some of those projects even try to bring parts of the Python Standard Libraries to Javascript, making it possible to share even more code between client and server. The obvious flaw of this is, that more Javascript code needs to be transferred to the client and it will cost some performance.

By doing the opposite, using the Javascript libraries in Python, this could be avoided, and you can still use the exact same code on the client as on the server.

Status

Currently, this is only proof-of-concept, some parts of it were not tested thoroughly.

One thing that was better tested and might come handy is the Date class.

Requirements

For using the date class you need pytz, tzlocal and dateutil:

pip install pytz
pip install tzlocal
pip install dateutil

jslib's People

Contributors

valmynd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.