A library and command line interface for the ezyVet v1 API written in Python.
For more information about ezyVet, the cloud-based veterinary practice management
system visit https://www.ezyvet.com/.
Copyright (C) 2018 - DoveLewis
Author: Avi Solomon ([email protected])
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
To use this application, you will need to register and receive an API key
from the ezyVet API team.
The application can be found https://www.ezyvet.com/api-signup
This program implements the ezyVet version 22.8 API, all options may not be available in the version you are running. To check the availability of features in your version navigate to your API reference: https://YOURCLINICNAME.ezyvet.com/api/docs
This is an open source project and we hope you contribute. For more Information about the ezyVet API, which this application is built upon, see: https://apisandbox.trial.ezyvet.com/api/docs/.
This program has been tested under Ubuntu Linux 16.10 and 18.10. It should run under POSIX compatable OS that can run Python 3.5+ but it has not been tested.
Copy setting_Example.py
as settings.py
and fill in your credentials.
This file is should never be under source control and should be explicitly
ignored in your .gitignore
file.
Git: https://github.com/genepool99/ezyVetCLI.git
git clone -b production git@https://github.com/genepool99/ezyVetCLI.git
Using PIP:
sudo pip install --upgrade virtualenv
or
Using APT:
sudo apt-get install python3-venv
python3 -m venv venv
source venv/bin/activate
You should now have a prompt that looks something like:
(venv) user@computer:~/home/user/ezyvetcli$
In the base ezyvetcli directory run
pip install -r requirements.txt
python3 ezyvet_cli.py --debug -T
There will be a verbose output, but you should see no "ERROR:" messages and ending with:
"INFO:main:Init Complete."
deactivate
Python3 (3.5.2+)
PEP 8 (https://www.python.org/dev/peps/pep-0008/)
-ezyvetcli <- root directory
-venv <- the virtual environment
-ezyvet <- the ezyvet library
After adding or upgrading modules you must run pip freeze > requirements.txt
and commit the requirments.txt.
Submit a pull request.
To test your credentials and setup with verbose output:
python3 ezyvet_cli -v -T
Get help using the program:
python3 ezyvet_cli.py --help
Get the list of appointment status codes:
python3 ezyvet_cli.py --appointmentStatus ''
To get the first page of active records for hospitalized patients (assuming "In Hospital" is code 9):
python3 ezyvet_cli.py --appointment '{"active":"true", "appointment_status_id":9}'
Lookup a countries (1 page):
python3 ezyvet_cli.py -p --country ''
Lookup invoice #50003:
python3 ezyvet_cli.py -p --invoice '{"id":50003}'
Lookup invoice ID 50003 items:
python3 ezyvet_cli.py -p --invoiceLine '{"invoice_id":50003}' -m 30
Lookup animals named foo:
python3 ezyvet_cli.py -p --animal '{"name":"foo"}'
Lookup contact ID 104834:
python3 ezyvet_cli.py -p --contact '{"id":104834}'
Lookup contact details:
python3 ezyvet_cli.py -p --contactDetail '{"id":104834}'
To build complex filters, see https://apisandbox.trial.ezyvet.com/api/docs for a listing of query parameters.