Ask is a modern open-source transpiled programming language, designed for building backend services and APIs. Ask reduces the amount of needed boilerplate code for setting up things like database connections and authentication to virtually zero lines.
Project description
Ask
Introduction.
Ask is an open source, dynamic, and transpiled programming language built for building backends and APIs. Ask directly transpiles to Python, more specifically Flask.
Feature Highlights
- Built-in JWT Authentication.
- Super Simple Database Management.
- Syntax Inspired by Python.
- Built-in CORS Support.
- Reduces Boilerplate.
- Compatible with Python*
* = You can import external Python modules and call them from you Ask code.
Easy to Learn
Ask's syntax is heavily inspired by Python, and can almost be considered to be a superset of Python. This means that picking up Ask is super easy if you’re already familiar with Python.
The main idea behind Ask is to simplify common backend actions (e.g. working with databases). Building a full database CRUD REST API with JWT authentication in Ask is very straight forward and simple and requires virtually zero lines of boilerplate code and no setup whatsoever.
Extendable.
Ask is a transpiled language (kind of like TypeScript) which means that it compiles the source code to another language that has a similar level of abstraction. In Ask's case, the target language is Python, more specifically a Flask app.
Flask is a very popular and well-established web framework for Python, so there's already a lot of tools, and services for deploying Flask apps.
The transpiled app is completely standalone and doesn't require Ask in any way.
Installation
- You can install Ask from the PyPI. You can use
pip
but we recommend that you use pipx. $ pipx install ask-lang
.- Then run your apps with:
$ ask [your file].ask
.
Run locally
- Clone this repo:
https://github.com/Buscedv/Ask.git
. - Install Poetry.
- Create a new virtual environment:
python3 venv venv
. - Activate it:
source venv/bin/activate
. - Install dependencies:
poetry install
. - (Optional but helpful in some cases) Run Ask in development mode: Docs.
If you want to contribute please read the CONTRIBUTING.md file for code style, standards, etc.
Example (Ask vs Flask)
Here is the same basic app with one GET route written in Ask and in Python with Flask.
Ask
products = [
{
name: 'Product 1',
price: 30.0,
qty: 300
},
{
name: 'Product 2',
price: 15.5,
qty: 20
}
]
@get('/api/v1/products'):
respond({products: products})
Flask
This is what the same application would look like in Flask.
from flask import Flask, jsonify
app = Flask(__name__)
products = [
{
'name': 'Product 1',
'price': 30.0,
'qty': 300
},
{
'name': 'Product 2',
'price': 15.5,
'qty': 20
}
]
@app.route('/api/v1/products', methods=['GET'])
def get_products():
return jsonify({'products': products})
if __name__ == '__main__':
app.run()
As you can see Ask hides away all the clutter and boilerplate.
Documentation
You can find the full documentation on docs.ask-lang.org.
Contact
- Website: ask-lang.org.
- Email: me(a)edvard.dev.
- GitHub: Buscedv.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ask_lang-1.4.0.tar.gz
.
File metadata
- Download URL: ask_lang-1.4.0.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a91c2f327e40a6d7f0d01b4e003a15c1707337bc7c23a715cec2edf33232784 |
|
MD5 | a997ee7d2aa7a2c054c330d1617e06a3 |
|
BLAKE2b-256 | 5c36f3d6e637939c00f6393446e405384644a40e60f16404374fb12355cfa1df |
File details
Details for the file ask_lang-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: ask_lang-1.4.0-py3-none-any.whl
- Upload date:
- Size: 58.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be1d0fa188871cbfda4613c278d34c82399f11635bf2b01c431fd32c6dfe07d3 |
|
MD5 | 0b419416d1c932a911a7637943a39b11 |
|
BLAKE2b-256 | a4056f90530d6724e78b9c066f076d0a33e0fd3de53f55f60b96234c2e857df5 |