semvec/pypi-packages huggingface dataset:
progressbar-easy 1.1.1.3
A simple progressbar to track progress with built in timer
License: MIT
Keywords: progressbar,progress bar,progressbar_easy,easy progressbar,easy progress bar

# Progress Bar
This is a simple progress bar that allows for easy use to display progress.

# Features
- Timer to estimate time remaining
- Timer adjusts to rates
- Learning rate can be changed
- Choice of length of bar
- Choice of character bar is made of
- Option for item count or percentage completed (or both)
- Option for method of computing completion time.

# Installation
Install with pip: `pip install progressbar_easy`

# Usage
Imported with `from progressbar import ProgressBar`

Initialize object with `bar = ProgressBar(number of iterations)`

Use in loop. Inside loop at the end, put `bar.update(K)` or `bar += K` where K is the number of iterations completed since last update.
Prefer `bar.update(K)` if you want to update the bar every iteration.

Defaults to use the Bellman equation to estimate time remaining.
Add `use_average=(True, N)` arguement to use the average of the last N iterations instead of Bellman equation.

Example: `bar = ProgressBar(range(2000), use_average=(True, 420)):`

## Or
Use as an iterator object

```Python
for i in ProgressBar(range(100), lr=.0001):
    ...
```


# Change Log

## 1.1.1 (4/21/2022)
- Added ability to use generators

## 1.1.0 (10/22/2021)
- Added ability to use the average time to estimate future time.
- Added docstrings.
- Improved performance when using "+=" opperator.
- Increased efficiency of object.

## 1.0.4.4 (6/11/2021)
- Bug Fixes

## 1.0.4 (6/11/2021)
- Added "__iter__" attribute to allow for more effective use in loops.

### Example:
```Python
for i in ProgressBar(range(10)):
    ...
```

## 1.0.3.3 (6/8/2021)
- Bug Fixes

## 1.0.3 (6/2/2021)
- Added ability to adjust "learning rate" for the rate of items
- Made "completed" arguement for "update" method default to None, which just means increment by one

## 1.0.2.2 (5/7/2021)
- Bug Fixes

## 1.0.2 (5/6/2021)
- Added support for updating multiple items (timer would update as one item)
- Added ability to adjust the starting rate of items for the timer
- Fixed bugs using "+=" (__iadd__) (caused timer to not work)

## 1.0.1.2 (5/6/2021)
- Bug Fixes

## 1.0.0 (5/6/2021)
- First Release
pyselfmongo 0.1.0
A PySelfMongo client for the [MongoDB][mongo] database is a thin client that connects to a mongo server and provides a simple interface to the database. A client is written as a singleton to make sure that only one connection is open at a time. The connection timeout is taken care by checking the server info every time a request is made. A new connection is made if the server info is not available or the connection has timed out.
License: MIT
Requires Python: >=3.10,<4.0
Keywords: mongo,mongodb,client,self,singleton,connection,timeout

Py Self Mongo
==========

A self mongo client for the [MongoDB][mongo] database is a thin client that connects to a mongo server and provides a simple interface to the database.
A client is written as a singleton to make sure that only one connection is open at a time. The connection timeout is taken care by checking the server info every time a request is made.
A new connection is made if the server info is not available or the connection has timed out. The project is developed using poetry and the [Pytest][pytest] framework.

How to use
----------
1. Create a config file with name `.mongo_config.yaml` in the root directory of the project. The config file should contain the following fields:

```yaml
mongo:
  host:
    localhost
  port:
    27017
  db_name:
    db_name
  password:
    password
  username:
    username
```
The host can be an IP address or a hostname. E.g. In case of a hosted mongo server in aws, the hostname is `ec2-*-**-**-**.**-east-2.compute.amazonaws.com`.
The client can be used as follows:

```python
from pyselfmongo import PySelfMongo

mongo_client = PySelfMongo()
mongo_client.get_collection('collection_name')
```

2. If no config file is found, the client will try to connect to the localhost with default port 27017. In this case the client can be intialized as follows:

```python
from pyselfmongo import PySelfMongo

mongo_client = PySelfMongo(db_name='db_name', username='user_name', password='password')
mongo_client.get_collection('collection_name')
```

Methods and attributes
---------------------
- `get_collection(collection_name)`: Returns a collection object.
- `get_document_by_id(collection_name, document_id)`: Returns a document object.
- `get_document_by_query(collection_name, query)`: Returns a list of document objects.
- `get_document_by_query_with_projection(collection_name, query, projection)`: Returns a list of document objects.
- `get_all_document_generatosr(collection_name, filter)`: Returns a generator of all documents in the collection.
- `delete_document(collection_name, document_id)`: Deletes a document.
- `delete_document_by_id(collection_name, document_id)`: Deletes a document.
- `update_document_by_field(collection_name, field, value)`: Updates a document

Installation
------------
Install using pip:
```bash
$ pip install pyselfmongo
```