Skip to content

Hy[Python] JQL query builder (under development)

License

Notifications You must be signed in to change notification settings

bakhoraliev/hyjql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyJQL

JQL query builder for Hy and Python.

What is Hy?

From Hy documentation:

Hy is a Lisp dialect that's embedded in Python. Since Hy transforms its Lisp code into Python abstract syntax tree (AST) objects, you have the whole beautiful world of Python at your fingertips, in Lisp form.

Quickstart

There are simple queries from JQL documentation.

From hy:

(import hyjql :as jql)

;; project == "Test"
(jql.format {:equals ["project" "Test"]})
;; project == "Test" and assignee == currentUser()
(jql.format {:and [{:equals ["project" "Test"]}
                   {:equals ["assignee" "currentUser()"]}]})

From Python:

import hyjql as jql

# project == "Test"
jql.format({"equals": ["project" "Test"]})
# project == "Test" and assignee == currentUser()
jql.format({
  "and": [
    {"equals": ["project" "Test"]},
    {"equals": ["assignee" "currentUser()"]},
  ],
})

Installation

Simply add hyjql as a dependency to your project:

pip install hyjql

About JQL

About

Hy[Python] JQL query builder (under development)

Topics

Resources

License

Stars

Watchers

Forks

Languages