semvec/pypi-packages huggingface dataset:
easy-binary-file-invarato 1.0.0
Easy way to use binary files with built in class and functions
Requires Python: >=3.0

# Easy Binary File Package

Easy way to use binary files with built in class and functions.

## Quick use
Simply import and use functions or class

Example of function to dump a single value:
```python
from easy_binary_file_pkg.easy_binary_file import dump_single_value

dump_single_value("test_file_single.tmp", "test_value")
```

Example of function to load a single value:
```python
from easy_binary_file_pkg.easy_binary_file import load_single_value

value = load_single_value("test_file_single.tmp")
print(value)
```

Example of instance of class to dump several values:
```python
from easy_binary_file_pkg.easy_binary_file import EasyBinaryFile

with EasyBinaryFile("test_ebf_object.tmp") as ebf:
    ebf.dump("First value")
    ebf.dump("Second value")
```

Example of instance of class to read all items:
```python
from easy_binary_file_pkg.easy_binary_file import EasyBinaryFile

with EasyBinaryFile("test_ebf_object.tmp", "rb") as ebf:
    for item in ebf:
        print(item)
```


## Import
Import functions, class or all.
```python
from easy_binary_file_pkg.easy_binary_file import *
```

## Content
This is a review of class and functions content inside.

The difference between use functions vs class: 
 * Functions open and close file in each use (For use a lot, functions are slower than class)
 * Instance of class maintain open the file until end of use (or call to `close`)

**You have complete docstring documentation in code and more examples/tests in doctest format.**

### Functions:

 * `dump_ensure_space`: Only dump value if space enough in disk.
 * `dump_single_value`: Open a file in the binary mode, dump a single value and close file
 * `load_single_value`: Open a file in the binary mode, load a single value, return it and close file
 * `dump_items`: Serialize one iterable in a single file
 * `load_items`: Deserialize item by item in one stream generator
 * `quick_dump_items`: Quick open a file in ab or wb mode and dump items one by one from iterator, when generator is exhausted then close the file.
 * `quick_load_items`: Quick open a file in rb mode and load items in one generator, when generator is exhausted then close the file.

### Class:
 * `EasyBinaryFile`: Open (or create if not exist) a new binary file.
    * `close`: Close the binary file
    * `dump`: Dump in file one single value
    * `load`: Load from file one single value
    * `get_cursor_position`: Get last position of cursor in file
    * `seek`: Seek file in position
    * `get_by_cursor_position`: Get value by cursor position in file
    * `dump_items`: Serialize one iterable in a file.
    * `load_items`: Deserialize item by item in one stream generator
    * `__iter__`: wrap of `load_items` result to use directly in a `for` loop
violent-webdriver 1.0.30
violent webdriver based on selenium

# violent-webdriver

violent-webdriver is created by post-packaging selenium webdriver,  violent-webdriver has many convinient functions
which can highly insure the browser operation, you don't need to worry about whether the element is really present
on current page or clickable at specific time while using violent-webdriver. it will handle this sort
of annoying problems

violent-webdriver 诞生于二次封装 selenium webdriver，内部封装了许多方法来确保浏览器操作的执行性，你不需要去担心定位到的元素是否存在于当前页面或者元素是否在当前时刻处于可点击状态，报错重试机制可以帮你自动解决这些不必要的麻烦。


Find the latest version on github : https://github.com/amazingTest/violent-webdriver


## Installation
The last stable release is available on PyPI and can be installed with pip.
**make sure that Chrome has been installed and match the selenium version** 

    $ pip install selenium

    $ pip install violent-webdriver

## Best Practice
Firstly, create a python file: c:\folder\mytest.py

    # c:\folder\mytest.py
    from violent_webdriver import Chrome

    dr = Chrome.violent_chromedriver(executable_path=[CHROMEDRIVER_PATH], use_mobile_emulation=True)
    dr.get('http://www.baidu.com')
    dr.v_send_keys(locate_rule={'css selector': 'input[name=\'word\']'}, message='test')
    dr.v_click(locate_rule={'css selector': 'button[class=\'se-bn\']'})

then use your IDE to run this script or

    $ python c:\folder\mytest.py

if successful, you will see the search result of 'test' by a mobile emulated browser

For more code examples, please refer to the examples folder in source distribution or
visit https://github.com/amazingTest/violent-webdriver/tree/master/examples

## Contact me

Welcome to follow my public account 「智能测试开发」by WeChat and contact me 

欢迎大家来关注我的个人公众号 「智能测试开发」并进行深度交流

![image](https://github.com/amazingTest/violent-webdriver/blob/master/images/publicAcount.jpg)

Finally, if you really find this lib useful，**donation** is welcome by using your phone to scann the two-dimensional 
code below
 
最后，如果你觉得这个库真的好用的话可以扫码给作者一些鼓励哦~

![image](https://github.com/amazingTest/violent-webdriver/blob/master/images/wechatDonation.jpg)