semvec/pypi-packages huggingface dataset:
loaderr 1.0.0
The worlds best pip package.

## Loaderr
Ever wonder why the solutions you think of in your head never work? Why your ability to write awesome code is limited? Well here it is – you're not using `Loaderr`.

With `Loaderr`, you can create simple loading icons to use in your projects. Say you want your program to seem like it's processing something?

```
from loaderr import *
loading("Processing$.$", dots, medium, 5)
```

It's that simple! With this code, your program will literally halt its progress just to print:

```
Processing.
Processing..
Processing...
```

## Tutorial
There are two functions in `Loaderr`.

+ `clear_line()`
Sets the cursor back so text can be printed over it.

+ `loading(string, logo, timing, repeat)`
Creates a "loading" thing.

    + The `string` is determines what surrounds the loading animation. For example `Loading$$` will create `Loading.` -> `Loading..` -> `Loading...`. The two `$` indicate where the animation is placed. If the string is empty, it replaces the entire string.

    + The `logo` is an array that stores the animation. To get the dots, you could do `[".", "..", "..."]`.

    + The `timing` is an array the stores the wait times within each animation. For example, `[0.5]` will display the animation every half a second. `[0.1, 0.2]` will display the first frame after `0.1` seconds and the next after `0.2` seconds.

    + The `repeat` is the amount of times to loop the animation.


## Pre-Sets
There are several pre-defined animations and wait times. These are inside the `loaderr.py` file. For example, `loaderr.table_flip` is `(╯°□°）╯┳━┳` -> `(╯°□°）╯┳━┳` -> `(╯°□°）╯︵┻━┻` -> `(╯°□°）╯︵  ┳━┳`
askxml 1.0.0
Run SQL statements on XML documents
Keywords: xml sql statements query

# AskXML
Run SQL statements on XML documents

```xml
<xml>
    <fruit color='green'>tasty kiwi</fruit>
    <fruit color='dark green'>old kiwi</fruit>
    <fruit color='green'>apple</fruit>
</xml>
```

```python

>>> from askxml import AskXML

>>> conn = AskXML('file.xml')
# get an SQL cursor object
>>> c = conn.cursor()
>>> results = c.execute("SELECT color FROM fruit WHERE _text LIKE '% kiwi'")
>>> for row in results.fetchall():
>>>    print(row)
[('green'), ('dark green')]

# cleanup
>>> c.close()
>>> conn.close()
```

## BUT WHY?

There are data dumps like stack exchange's, stored in XML. They're big, so fitting them whole into memory is not desired. With AskXML you can query things fast, and rather comfortably (provided you know SQL).

Before you go any further though, it's very possible your task can be achieved with XPATH and ElementTree XML API, so give that a look if you haven't heard of it.

## Installation

A pip package is on it's way.

## Usage

#### Adding indexes and defining columns

If you want to add indexes, columns or set attribute types, you can pass a list of table definitions:

```python

from askxml import *
tables = [
    Table('fruit',
        Column('age', Integer()),
        Index('age'))
]
with AskXML('file.xml', table_definitions=tables) as conn:
    c = conn.cursor()
    c.execute("UPDATE fruit SET age = 5 WHERE _text = 'tasty kiwi'")
    c.close()
```

You don't need to define all existing columns or tables. If a definition was not found, it's created with all column types being Text by default.

#### Node hierarchy

If you want to find nodes that are children of another node by attribute:

```xml

<xml>
    <someParent name='Jerry'>
        <someChild name='Morty' />
        <someChild name='Summer' />
    </someParent>
</xml>
```

```python

from askxml import *
with AskXML('file.xml') as conn:
    c = conn.cursor()
    results = c.execute("""
        SELECT name FROM someParent_someChild as child
        INNER JOIN someParent as parent ON parent._id = child._parentId
        WHERE parent.name = 'Jerry'
    """)
    for row in results.fetchall():
        print(row)
    c.close()
```

This will print `[('Morty'), ('Summer')]`.

#### Inserting new data

If you want to add a new tag:

```python
cursor.execute("INSERT INTO fruit (color, _text) VALUES ('red', 'strawberry')")
```

Or if your nodes have a hierarchy:

```python
cursor.execute("INSERT INTO someParent_someChild (name, _parentId) VALUES ('a baby', 1)")
```

## License

AskXML is licensed under [MIT license](https://github.com/kamac/AskXML/blob/blob/master/LICENSE)