avrex-0.2.0
توضیحات
AssociationVoice reports exporter
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | avrex-0.2.0 |
| نام | avrex |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Carson Lam |
| ایمیل نویسنده | 46059+carsonyl@users.noreply.github.com |
| آدرس صفحه اصلی | https://github.com/carsonyl/avrex |
| آدرس اینترنتی | https://pypi.org/project/avrex/ |
| مجوز | Apache License 2.0 |
# avrex: AssociationVoice reports exporter
[](https://github.com/carsonyl/avrex/actions/workflows/tests.yml)
avrex is a Python library and command-line tool for downloading reports
off websites hosted by [AssociationVoice](https://associationvoice.com/).
AssociationVoice provides websites for property management, and may be used
by groups like strata corporations, condo boards, and homeowner associations (HOAs).
avrex makes it easy for data stored on AssociationVoice websites to be
exported for backup, automation, analysis, and transformation.
## Installation
`pip install avrex`
Supports Python 3.7+. Tested on Python 3.9.
## Usage
For all operations, avrex needs the URL for the AssociationVoice site's login page,
and a corresponding username and password.
These arguments are automatically picked up from the environment variables
`AV_URL`, `AV_USERNAME`, and `AV_PASSWORD`.
They are also automatically loaded from an Envfile if present,
and accepted as options in the CLI, and as arguments in the API.
### Command-line interface
Installation adds the `avrex` script. The commands are `avrex reports` and `avrex download-report`:
```
> avrex reports --help
Usage: avrex reports [OPTIONS]
List available reports.
Options:
--username TEXT
--password TEXT
--url TEXT URL to login page
--help Show this message and exit.
```
```
> avrex download-report --help
Usage: avrex download-report [OPTIONS] REPORT DESTINATION
Download a report.
REPORT is a report ID or exact name of a report. DESTINATION is a path to
a file. Existing files are overwritten. The file must have an extension
matching a valid export format for the report.
Options:
--date-range TEXT Format: YYYY-MM-DD,YYYY-MM-DD
--username TEXT
--password TEXT
--url TEXT URL to login page
--help Show this message and exit.
```
### API
Reports listing and downloading is available in `avrex.AssociationVoiceApi`:
```pycon
>>> from avrex import AssociationVoiceApi
>>> api = AssociationVoiceApi(username="foo", password="bar", url="https://secure.associationvoice.com/Account/Login/100")
>>> api.list_reports()
OrderedDict([('16', 'Advanced Map Usage'), ('6', 'Directory - Communication Methods Updates'), ('15', ...
>>> with open("comm-updates.csv", "wb") as outf:
... api.download_report("Directory - Communication Methods Updates", "2021-01-01", "2021-01-31", "CSV", outf)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.0.0 | MechanicalSoup |
| - | python-dotenv |
| - | click |
| - | pytest |
| - | pytest-vcr |
| - | wheel |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl avrex-0.2.0:
pip install avrex-0.2.0.whl
نصب پکیج tar.gz avrex-0.2.0:
pip install avrex-0.2.0.tar.gz