semvec/pypi-packages huggingface dataset:
gen4id 1.0.2
gen4id a simple but maybe useful package for auto-increment ids

gen4id
======

Installation
>>>>>>>>>>>>>

Usage
>>>>>>>>

.. code-block::

    pip install gen4id


Normal
:::::::::

.. code-block::

    from gen4id import IncreaseGen
    ic = IncreaseGen(key_len=8)
    uid = ic.encode(increase_id=10)
    print(uid)


Use Random String
::::::::::::::::::
by default, it user the `gen4id.increase_gen.MIXED` as the random string for choose,  you can use a generate random string for you application

.. code-block::

    from gen4id import random_str,IncreaseGen
    from gen4id.increase_gen import MIXED

    rstr = random_str(MIXED)
    ic = IncreaseGen(choose=rstr,key_len=10)
    uid = ic.encode(increase_id=10)
    print(uid)


Add Digit Check Bit
::::::::::::::::::::

.. code-block::

    from gen4id import random_str,IncreaseGen
    from gen4id.increase_gen import MIXED

    rstr = random_str(MIXED)
    ic = IncreaseGen(choose=rstr,key_len=10,digit=True,digit_bit=2)
    uid = ic.encode(increase_id=10)
    print(uid)

More
>>>>>>>>>

To Be Continue ....
local-db-lasdot 0.0.2
light weight package for populating mongo database and query it with energy data
Requires Python: >=3.5

# Local Database

## Description: 
Popluate and query local mongo server with 
energy api data
<hr>

## Installation Steps:
### Requirements:
`numpy:` 1.18.2
<br>
`pandas:` 1.0.3
<br>
 `pymongo:` 3.10.1
 <br>
 `tqdm:` 4.45.0

 <b>note:</b> Please ensure that mongodb is installed and active before running.

### Installation:
`pip install local-db-lasdot==0.0.1`


### Import Statement:
~~~
from local_db.create_db import CreateDb

from local_db.query_db import QueryDb
~~~


# Populate Database Section
## Sample Usage

### Batch insertion:
~~~~
create_db = CreateDb(db_name='example_db')
create_db.batch_insert('folder_path')
~~~~

### Single insert:
~~~~
create = CreateDb(db_name='example_db')
create.single_insert(time_collection='time_(1_min|15_min)', data_file_dir='data folder path', meta_file_dir='metadata folder path')
~~~~

# Query Database Section
## Sample Usage

### Query with filter
~~~
query = QueryDb(db_name='example_db')
query_param = ['nest', 'grid', 'solar', 'clotheswasher1', 'dishwasher1']
data, id_list = query.query_df(query_param, 'time_15_min', db_op='OR', city=['all'])
try:
    data = QueryDb.filter_by(data, dataid='6139', city='austin')
except Exception as e:
    print(e)
~~~

### Query with dictionary parameter
~~~
query = QueryDb(db_name='example_db')
query_param = ['air1', 'nest', {'first_floor_square_footage': 2148}]

data, id_list = query.query_df(
    query_param,
    time_collection='time_15_min',
    db_op='AND',
    city=['all']
    first_floor_sqft_tol=0
)
~~~

### Test scripts
Must have test json files to implement this.
<br>
<b>note: </b> commands must be implemented from command line ./local_db directory

~~~
python -m unittest tester.TestCreateDbClass.test_db_server

python -m unittest tester.TestCreateDbClass.test_batch_insert

python -m unittest tester.TestCreateDbClass.test_query_error_check

python -m unittest tester.TestCreateDbClass.test_query_empty

python -m unittest tester.TestCreateDbClass.test_query_db_op
~~~