semvec/pypi-packages huggingface dataset:
exex 1.0.0
Extract data from Excel documents.
License: MIT
Requires Python: >=3.6.2,<4.0.0
Keywords: excel,extract,parser,xlsx

# exex ![test](https://github.com/vikpe/exex/workflows/test/badge.svg?branch=master) [![codecov](https://codecov.io/gh/vikpe/exex/branch/master/graph/badge.svg)](https://codecov.io/gh/vikpe/exex) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
> Extract data from Excel documents

## Installation
```sh
pip install exex
```

## Usage

![Sample Excel file](https://raw.githubusercontent.com/vikpe/exex/master/docs/sample_xlsx.png "Sample Excel file")

**Load Excel file**
```python
from openpyxl import load_workbook
from exex import parse

book = load_workbook("sample.xlsx") # load excel file
sheet = book.active # get active sheet
```

**Single cell by name**
```python
parse.values(sheet["A1"])
"name"
```

**Single cell by row/column number**
```python
parse.values(sheet.cell(row=1, column=1)) 
"name"
```
   
**Range of cells**
```python
parse.values(sheet["A1":"B2"])
[
  ["name", "abbreviation"],
  ["alpha", "a"],
]
```

**All cells**
```python              
parse.values(sheet.values)
[
  ["name", "abbreviation", "age"],
  ["alpha", "a", 1],
  ["beta", "b", 2],
  ["gamma", "g", 3],
]
```

**Row by number**
```python                  
parse.values(sheet[1])
["alpha", "a", 1]
```

**Range of rows**
```python           
parse.values(sheet[1:2])
[
  ["name", "abbreviation", "age"],
  ["alpha", "a", 1],
]
```

**Column by name**
```python            
parse.values(sheet["A"])
["name", "alpha", "beta", "gamma"]
```

**Rangge of columns**
```python
parse.values(sheet["A:B"])
[
  ["name", "alpha", "beta", "gamma"],
  ["abbreviation", "a", "b", "g"],
]
```

**Ways to access sheets**
```python
# Sheets
book.sheets[0]                # (sheet) sheet by index
book.sheets["prices"]         # (sheet) sheet by name
book.active                   # (sheet) active sheet

book.sheetnames               # (array) sheet names
```

## Development

**Setup**
```sh
poetry install
```

**Tests** (local Python version)
```sh
poetry run pytest
```

**Tests** (all Python versions defined in `tox.ini`)
```sh
poetry run tox
```

**Code formatting** (black)
```sh
poetry run black .
```
alfred-genie 0.1.20211114
Genie for Alfred
License: MIT

alfred-genie
------------

Genie for Alfred

`GitHub
license <https://github.com/namuan/alfred-genie/blob/master/LICENSE>`__
`Twitter Follow <https://twitter.com/deskriders_twt>`__

|image0|

Using from Alfred
~~~~~~~~~~~~~~~~~

Install ``Alfred Genie.alfredworkflow`` in Alfred and use the ``genie``
command to use any available function.

|image1|

Using from Command line
~~~~~~~~~~~~~~~~~~~~~~~

::

   $ pip install alfred-genie

Then the following commands will be available

::

   $ alfred-genie 
   Usage: alfred-genie [OPTIONS] COMMAND [ARGS]...

   Options:
     --help  Show this message and exit.

   Commands:
     base64-decode
     base64-encode
     commands # ignore this as this is only used from Alfred
     format-json
     minify-json

Contributing
~~~~~~~~~~~~

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

You’ll need a working version of ``Python3`` to run these scripts.

1) Create and use new virtual env

::

   python3 -m venv venv
   source venv/bin/activate

2) Install required dependencies

::

   $ pip install -r requirements.txt

3) Run locally

::

   $ python local_main.py ...

Creating Alfred Workflow
~~~~~~~~~~~~~~~~~~~~~~~~

For publishing it in workflow, we need to perform following additional
steps

-  [ ] Open workflow file in Alfred
-  [ ] Open workflow directory in Terminal
-  [ ] Apply any changes from this directory to workflow directory
-  [ ] Install dependencies in workflow directory
   ``pip install --target=. click``
-  [ ] Export workflow and publish to Github

Publishing Updates to PyPi
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: shell

   $ make package

Enter the username and password for pypi.org repo when prompted

License
~~~~~~~

`MIT <https://choosealicense.com/licenses/mit/>`__

.. |image0| image:: docs/alfred-genie-intro.png
.. |image1| image:: docs/alfred-genie-usage.gif