Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 0e265ed

Browse files
authored
version 0.0.2 (#15)
* set version to 0.0.1 * Support for ArloQ (#2) * Support for ArloQ * Moved all detection to same conditional * Fixed lint issues * Added tests for arm/disarm * Added extra methods * Implement method to refresh attrs * Combined API_URL and force super()__init__() for ArloCamera * Filter on Provisioned Devices (#3) Filter on Provisioned Devices * - Fixed lint error E502 the backslash is redundant between brackets - Fixed super() constructor lint error E: 12,13: Bad first argument 'ArloGeneric' given to super() (bad-super-call) https://docs.quantifiedcode.com/python-anti-patterns/correctness/bad_first_argument_given_to_super.html - Fixed build Travis: https://travis-ci.org/tchellomello/python-arlo/jobs/224846095 * WIP (#4) Code refactoring * Updated README.rst and added ArloBaseStation object. * Updated pip git install * Moved mode from Camera to Base Station * Added method to show number of unseen videos * Added Arlo Q camera (#9) Fixes issue #7 * Implemented ability to reset unseen videos by camera or globally. (#10) * Enhancements (#14) * Refactoring * Created function to return number of videos recorded today * - Simplified documentation - Created pretty_timestamp - Created method to refresh Arlo object * Keeping simple name on README * Added contributing.rst instructions * Bump version 0.0.2
1 parent 7941113 commit 0e265ed

File tree

11 files changed

+858
-129
lines changed

11 files changed

+858
-129
lines changed

CONTRIBUTING.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome and very appreciated!!
6+
Keep in mind that every little contribution helps, don't matter what.
7+
8+
Types of Contributions
9+
----------------------
10+
11+
Report Bugs
12+
~~~~~~~~~~~
13+
14+
Report bugs at https://github.com/tchellomello/python-arlo/issues
15+
16+
If you are reporting a bug, please include:
17+
18+
* Arlo product and firmware version
19+
* Steps to reproduce the issue
20+
* Anything you judge interesting for the troubleshooting
21+
22+
Fix Bugs
23+
~~~~~~~~
24+
25+
Look through the GitHub issues for bugs. Anything tagged with "bug"
26+
and "help wanted" is open to whoever wants to implement it.
27+
28+
Implement Features
29+
~~~~~~~~~~~~~~~~~~
30+
31+
Look through the GitHub issues for features. Anything tagged with "enhancement"
32+
and "help wanted" is open to whoever wants to implement it.
33+
34+
Documentation
35+
~~~~~~~~~~~~~
36+
37+
Documentation is always good. So please feel free to add any documentation
38+
you think will help our users.
39+
40+
Request Features
41+
~~~~~~~~~~~~~~~~
42+
43+
File an issue at https://github.com/tchellomello/python-arlo/issues.
44+
45+
Get Started!
46+
------------
47+
48+
Ready to contribute? Here's how to set up `python-arlo` for local development.
49+
50+
1. Fork the `python-arlo` repo on GitHub.
51+
2. Clone your fork locally::
52+
53+
$ git clone [email protected]:your_name_here/python-arlo.git
54+
55+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
56+
57+
$ mkvirtualenv python-arlo
58+
$ cd python-arlo/
59+
$ python setup.py develop
60+
$ pip install -r requirements_tests.txt
61+
62+
4. Create a branch for local development::
63+
64+
$ git checkout -b name-of-your-bugfix-or-feature
65+
66+
Now you can make your changes locally.
67+
68+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
69+
70+
$ tox -r
71+
72+
6. Commit your changes and push your branch to GitHub::
73+
74+
$ git add .
75+
$ git commit -m "Your detailed description of your changes."
76+
$ git push origin name-of-your-bugfix-or-feature
77+
78+
7. Submit a pull request through the GitHub website.
79+
80+
81+
Thank you!!

README.rst

Lines changed: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,81 @@ Installation
2424
$ pip install pyarlo
2525
2626
# Install latest development
27-
$ pip install \
28-
git+https://github.com/tchellomello/python-arlo@dev
27+
$ pip install git+https://github.com/tchellomello/python-arlo@dev
2928
3029
Usage
3130
-----
3231

3332
.. code-block:: python
3433
35-
# list devices
34+
# connecting
3635
from pyarlo import PyArlo
3736
arlo = PyArlo('foo@bar', 'secret')
3837
38+
# listing devices
3939
arlo.devices
40-
{'cameras': [<ArloCamera: Garage>, <ArloCamera: Patio>,
41-
<ArloCamera: Front Door>, <ArloCamera: Patio Gate>]}
4240
43-
# list all cameras
41+
# listing base stations
42+
arlo.base_stations
43+
44+
# listing Arlo modes
45+
base.available_modes
46+
['armed', 'disarmed', 'schedule', 'custom']
47+
48+
# setting a mode
49+
garage_cam.mode = 'armed'
50+
51+
# listing all cameras
4452
arlo.cameras
45-
[<ArloCamera: Garage>, <ArloCamera: Patio>,
46-
<ArloCamera: Front Door>, <ArloCamera: Patio Gate>]
4753
48-
# download latest snapshot image
49-
for camera in arlo.cameras:
50-
snapshot = '{0}.jpg'.format(camera.name)
51-
camera.download_snapshot(snapshot)
54+
# showing camera preferences
55+
cam = arlo.cameras[0]
56+
57+
# printing camera attributes
58+
cam.serial_number
59+
cam.model_id
60+
cam.unseen_videos
61+
62+
# refreshing camera properties
63+
cam.update()
64+
65+
# gathering live_streaming URL
66+
cam.live_streaming()
67+
rtmps://vzwow72-z2-prod.vz.netgear.com:80/vzmodulelive?egressToken=b723a7bb_abbXX&userAgent=web&cameraId=48AAAAA
68+
69+
# gather last recorded video URL
70+
cam.last_video.video_url
71+
72+
Loading Videos
73+
--------------
74+
75+
.. code-block:: python
76+
77+
# by default, all videos recorded within
78+
# the last 30 days will be pre-loaded
79+
arlo.ArloMediaLibrary.videos
80+
81+
# Or you can load Arlo videos directly
82+
from pyarlo.media import ArloMediaLibrary
83+
library = ArloMediaLibrary(arlo, days=2)
84+
len(library.videos)
85+
86+
# showing a video properties
87+
media = library.videos[0]
88+
89+
# printing video attributes
90+
media.camera
91+
media.content_type
92+
media.media_duration_seconds
93+
94+
# displaying thumbnail to stdout
95+
media.download_thumbnail()
96+
97+
# downloading video
98+
media.download_video('/home/user/demo.mp4')
99+
100+
101+
Contributing
102+
------------
103+
104+
See more at CONTRIBUTING.rst

0 commit comments

Comments
 (0)