`djscript` is a Python package for using **RapydScript** in your Django application. This package installs NodeJS/npm/RapydScript in an isolated virtual environment and includes utilities for writing RapydScript `*.pjs` files in your web application.
### What is RapydScript?
From the RapydScript README: "RapydScript (pronounced 'RapidScript') is a pre-compiler for JavaScript, similar to CoffeeScript, but with cleaner, more readable syntax. The syntax is very similar to Python, but allows JavaScript as well."
* Github: <https://github.com/atsepkov/RapydScript>
* Community: <http://groups.google.com/group/rapydscript>
### Usage
For Django development, there is a convenient `djurl` template tag which will freshly compile your RapydScript on each page request. On production, the static compiled javascript is served directly from your `static/` folder.
```
# settings.py
PROJECT_HOME = os.path.abspath(os.path.dirname(__file__))
STATIC_ROOT = os.path.join(PROJECT_HOME, 'static') + '/'
STATIC_URL = '/static/'
DJSCRIPT_PATHS = {
'path.to.rapydscript.file': 'file.js'
}
```
```
# template.html
{% djurl 'path.to.rapydscript.file' %}
```
Your source file (e.g. *path/to/rapydscript/file.pjs*) must end in the `.pjs` extension. Your target file destination is the value specified in settings.py. Your web server must have correct file permissions to write to your `static/` folder.
### Installation
```
pip install djscript
```
Metadata
Release files for DjScript 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| DjScript-0.1.0.tar.gz | 4.0 kB | Without provenance | Details for DjScript-0.1.0.tar.gz |
Release files / DjScript-0.1.0.tar.gz
| Download URL | DjScript-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcbc656d51e4571e5d7b63d8ee2c75637beb02357291f41830ee206d036d8830
|
|
BLAKE2b-256 checksum How to use checksums |
7bc5c15999b42d6b4e3c8124ca29fe5d8059d66cbc1949080eba953e51584302
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for DjScript 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.