Skip to content

RahmanAnsari/xkye_python

Repository files navigation

Xkye Python Library

Introducing Xkye-Python standard library to provide objective query builder for xkye language. You can easily query the entities from the xkye file using this library. It provides a more convenient and idiomatic way to write and manipulate queries.


Travis (.com) Codecov CodeStyle CodeFactor Grade Read the Docs PRs Welcome Synk Vulnerabilities


Installation

Install library with pypi:

$ pip3 install xkye

Updates CII Best Practices


Usage

from xkye import IO as io

#initiate the xkye with io
x = io(filename.xky)

#read the contents of the file
x.read()

#get the output of any of the entity from teh xky file
#to get the value of the entity
x.get("entityname")

#to get the value of the entity in the given clutch
x.get("entityname","clutchname")

#to get the value of the entity in the given cluth's span
x.get("entityname","clutchname", clutchspan)

#to get the span count of the given cluster
x.getSpan("clustername")

Examples

Please see the examples directory to see some complex examples using xkye-pyhton. For details about xkye syntax and format, use the offical Xkye-lang repo.


Documentation

Documentation is available at xkye-python.readthedocs.io.


Version matrix

Xkye version Xkye-Python Library version
>= 1.0.0 >= 1.0.0

Development

Clone this repository

git clone https://github.com/RahmanAnsari/xkye_python.git

Activate Virtual Environment (virtualenv):

$ virtualenv venv
$ source venv/bin/activate

To install all of the dependencies necessary for development, run:

$ make dev

To run all of the tests for xkye-python, run:

$ pytest xkye

Alternatively, it is possible to use the run tests using make file, which wraps pytest.

$ make test

To run all of the linters for xkye-python, run:

$ make lint

Upcoming features on or before v2.0.0

  • Ability to get the declared span limit of the cluster
  • Ability to add entity, clutch and subclutch

Code of conduct

This project and everyone participating in it will be governed by the Xkye Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to my email.


Contribution Guide

Want to hack on Xkye-Python? Awesome! We have Contribution-Guide. If you are not familiar with making a pull request using GitHub and/or git, please read this guide. If you're looking for ways to contribute, please look at our issue tracker.


License

Xkye-python is open-source standard python library for xkye language that is released under the MIT License. For details on the license, see the LICENSE file.

If you like this library, help me to develop it by buying a cup of coffee

Buy Me A Coffee