dtseqlib 1.1
Sequence data type.
Requires Python: >3.0

Description
=====
This library adds the new *data format*: sequence. Sequences has 2 attributes: **Name**, **Count**. **Name** - Name of the sequence element. **Count** - Count of elements.
Sequence presented in matrix format. One element of the sequence looks how:
```
[name = "Apple", count = 2].
```

Methods
=====
## sequence.__init__(seq=None) - Class constructor.
* _seq_ receives the matrix in the form below.
```
[[_first element_], [_second element_], ..., [_n element_]]
```
> [!CAUTION]
> Don't use any data type except integer in **count** attribute!

## sequence.append(name=None, count=0) - Element append function.
* _name_ receives name of the element.
* _count_ receives the count of current element.
```
> seq = dtseqlib.Sequence([["Autumn", 1]])
> seq.append("Element", 2)
> print(seq.get())

[["Autumn", 1], ["Element", 2]]
```
> [!CAUTION]
> Don't use any data type except integer in **count** attribute!

## sequence.insert(name=None, count=0, index=0) - Inserts the element by index.
* _name_ receives name of the element.
* _count_ receives the count of current element.
* _index_ receives the insert index.
```
> seq = dtseqlib.Sequence([["Autumn", 1]])
> seq.insert("Element", 2)
> seq.insert("Spring", 5, 2)
> print(seq.get())

[["Element", 2], ["Autumn", 1], ["Spring", 5]]
```
> [!CAUTION]
> Don't use any data type except integer in **count** and **index** attributes!

## sequence.delete(index=0) - Deletes the single element by index.
* _index_ receives the remove index.
```
> seq = dtseqlib.Sequence([["Autumn", 1], ["Spring", 2]])
> seq.delete(1)
> print(seq.get())

[["Autumn", 1]]
```
> [!CAUTION]
> Don't use any data type except integer in **index** attribute!

## sequence.clip(indexes=[-1, 0]) - Deletes the multiple elements in array range.
* _indexes* receives the min and max index in list for cliping.
```
> seq = dtseqlib.Sequence([["Autumn", 1], ["Spring", 2]])
> seq.clip([0, 1])
> print(seq.get())

[]
```
> [!CAUTION]
> Don't use any data type except integer in every element in **indexes** attribute! Use only from min to max sort!

## sequence.get() - Return list of the elements in sequence.

## sequence.scan(index=0) - Return single element from sequence array.
* _index_ receives the element index.
```
> seq = dtseqlib.Sequence([["Autumn", 1], ["Spring", 2]])
> print(seq.scan(1))

["Spring", 2]
```
> [!CAUTION]
> Don't use any data type except integer in **index** attribute!

## sequence.multiple_scan(indexes=[-1, 0]) - Return multiple elements from sequence array by range.
How clip, but instead of deleting.
> [!CAUTION]
> Don't use any data type except integer in every element in **indexes** attribute! Use only from min to max sort!

## sequence.scan_cbn(count=0) - Return list of the elements with define count.
```
> seq = dtseqlib.Sequence([["Autumn", 1], ["Spring", 2]])
> print(seq.scan_cbn(2))

["Spring", 2]
```
> [!CAUTION]
> Don't use any data type except integer in **count** attribute!

## sequence.scan_nbc(name=None) - Return list of the elements with define name.
How scan_cbn, but with name.

## sequence.get_bwc(count=0) - Get matrix of elements (blocks) with define count.
```
> seq = dtseqlib.Sequence([["Winter", 1], ["Spring", 2], ["Autumn", 1]])
> print(seq.bwc(1))

[["Winter", 1], ["Autumn", 1]]
```
> [!CAUTION]
> Don't use any data type except integer in **count** attribute!

## sequence.get_bwn(name=None) - Get matrix of elements (blocks) with define name.
How get_bwc, but with name.

## sequence.to_list() - Converts the sequence to array with order and count.
```
> seq = dtseqlib.Sequence([["Winter", 1], ["Spring", 2], ["Autumn", 1]])
> print(seq.to_list())

["Winter", "Spring", "Spring", "Autumn"]
```

## len(sequence) - Return count of the elements in sequence.

## to_sequence(list) - Return sequence from the list.
```
> list = [7, 7, 7, 9, 1, 1]
> print(dtseqlib.to_sequence(list))

[[7, 3], [9, 1], [1, 2]]
```

> [!WARNING]
> This opinion was added in 1.1 version, you get an error in the older versions.

Usage
=====
You can free use this library in your projects for different reasons.

***MIT LICENSE.***

Downloading
=====
> [!WARNING]
> Library only availble on Python 3.x.

You can install this library by running the following command in your terminal:
```
pip install dtseqlib
```
You can use the library after installing.
```
import dtseqlib
```
You can use the Sequence() class in your project. Example of project below.
```
seq = dtseqlib.Sequence([["Spring", 2], ["Winter", 5]])
seq.append("King", 4)
print(seq.get())
```

Outro
=====
This is my first Python library, and I'm still learning. I will continue updating this project and adding new features.