Skip to main content

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

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 (normal usage)

  • 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 (for development)

  1. Clone this repo: https://github.com/Buscedv/Ask.git.
  2. Install Poetry.
  3. Create a new virtual environment: python3 venv venv.
  4. Activate it: source venv/bin/activate.
  5. Install dependencies: poetry install.
  6. (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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ask_lang-1.4.5.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

ask_lang-1.4.5-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

Details for the file ask_lang-1.4.5.tar.gz.

File metadata

  • Download URL: ask_lang-1.4.5.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/23.1.0

File hashes

Hashes for ask_lang-1.4.5.tar.gz
Algorithm Hash digest
SHA256 23b08e8e765ac0df1493caec04363de018e8a00af14d0c702090f14ef2028590
MD5 7e71a3dc7ce04b5dbe8ec2b89fda6cc5
BLAKE2b-256 d94fafb3a5cc91e3ad0965531995e58e3777fccce6d83d2e1de6d3b8006bf5fa

See more details on using hashes here.

File details

Details for the file ask_lang-1.4.5-py3-none-any.whl.

File metadata

  • Download URL: ask_lang-1.4.5-py3-none-any.whl
  • Upload date:
  • Size: 58.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/23.1.0

File hashes

Hashes for ask_lang-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2f46e423ec1c71c7c9bf844c7ae19b4dd770423ee4d9ef2eb0edaa217849ca
MD5 7e16b12d34a6f62f5a5da714012ae611
BLAKE2b-256 93f1d80b0f30f3091479bfe4aef2559a9280ba0b663d1595e5118775102ee53b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page