Skip to main content
# GoPro

**A complete Python GoPro module made easy.**

![GoPro](http://cdn.snowboarding.transworld.net/wp-content/blogs.dir/442/files/2014/09/gopro-hero4-new-camera-black-silver-editions-600x342.png)

At the moment this module only works with the newest GoPro Hero 4.

Sadly the earlier versions of GoPro are not backwards/forwards compatible.



## Install

Easy install with Github or PyPi

Installing the **latest version from GitHub**.

```bash
$ git clone https://github.com/DenisCarriere/gopro.git
$ cd gopro
$ python setup.py install
```

Installing the **tested version from PyPi**.

```bash
$ sudo pip install gopro
```

## Quickstart

Once the installation is complete you are ready to start! :)

The default `IP` address for the GoPro is using `10.5.5.9`.

You must first be connected to the GoProApp Wifi connection.

Launch your favorite `ipython` or standard `python`

```python
>>> from gopro import GoPro
>>> camera = GoPro()
>>> camera.status
{'connection': 'OK',
'datetime': '2014-11-12T23:53:59',
'ip': '10.5.5.9',
'ok': True,
'screen': 'video',
'storage': '31.3 GB',
'time_offset': 'now'}
...
```

## Take a Photo or Video

With very simple commands you can tell your GoPro to start recording or take a photo.

The screen will automaticly change to the approriate page.

```python
>>> camera.photo()
>>> camera.video()
>>> camera.timelapse()
```

## Camera modes

Makes it easy to cycle threw each available modes.

```python
>>> camera.mode('burst')
>>> camera.mode('photo')
>>> camera.mode('timelapse')
>>> camera.mode('video')
...
```

## Locate (Beep! Beep!)

Can't find your device?? Call the locate function and it will Beep endlessly until there is no more battery.

To turn off the beeps, simply press the `mode` button on the device or use the `off` as a parameter.

```python
>>> camera.locate('on')
>>> camera.locate('off')
...
```

## Sleep

The camera will turn itself off, the Wi-Fi will still be active.

At the moment there is no working commands to turn the device back on.

To reactivate the device, press the `mode` button.

```python
>>> camera.sleep()
...
```

## Delete Photos

Might be useful to dump all those photos from your GoPro.

**Warning** once you delete photos/videos you cannot retrieve them back.

The `erase` function does the same as the delete all.

```python
>>> camera.erase()
>>> camera.delete_all()
>>> camera.delete_last()
...
```

## Settings

You can explore the different types of settings & status by getting the raw JSON response or selecting a specific pre-parsed attribute

### Processed attributes

**Status - Screen**

This will let you know which page your GP is currently active.

There are only 4 available outcomes.

```python
>>> camera.status_screen
'settings'
'video'
'photo'
'timelapse'
...
```

### Raw JSON Responses

The original response from the GoPro device.

```python
>>> camera.settings_raw
>>> camera.status_raw
...
```

## Date & Time

It is a good idea to sync your GoPro with the same clock as your computer.

An easy way to do this is use the `datetime` & `time_offset` attribute.

Try to aim your GoPro to have less than 1 second offset.

The `time_offset` is measured in (+/-) seconds.

```python
>>> camera.datetime
'2014-11-12 21:53:09'
>>> camera.datetime_offset
-0.320142
>>> camera.status['offset']
'now'
...
```

## File Storage

Here is how you can retrieve the total file storage in (KB) or pretty human readeable format.

```python
>>> camera.status_storage
31330144
>>> camera.status['storage']
'31.3 GB'
```

## Debug

Want to explore & troubleshoot the device a bit, you can retrieve the following properties from your device.

```python
>>> camera.debug
>>> camera.info
>>> camera.commands
...
```

## Contributors

A big thanks to all the people who have helped contribute!

To be a contributor, please message me with requests on [Twitter](https://twitter.com/DenisCarriere)/[Github issues](https://github.com/DenisCarriere/gopro/issues)

- @[Denis Carriere](https://github.com/DenisCarriere)
- @[Konrad Iturbe](https://github.com/KonradIT)
- @[Jason Moiron](https://github.com/jmoiron)

## License

The MIT License (MIT)

Copyright (c) 2014-2015 Denis Carriere

Metadata

Release files for gopro 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gopro 0.0.3
File Size Uploaded
gopro-0.0.3.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gopro 0.0.3
File Interpreter ABI Platform
gopro-0.0.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 19.1 kB

Release files / gopro-0.0.3.tar.gz

Download URL gopro-0.0.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab237b4090112b51a1d626ef7e501bf37370d42ac8f6f3a4e804fd9d5bda13e7
BLAKE2b-256 checksum
How to use checksums
c61842d761bbe1cb205bc7d69e33c748eb8be04d033a6497aa17290d2e4395cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gopro-0.0.3-py2.py3-none-any.whl

Download URL gopro-0.0.3-py2.py3-none-any.whl
Size 12.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c7641b4e09fb0a92868534743f1efc0bf05ad219b0a597340c6f110fe15a5704
BLAKE2b-256 checksum
How to use checksums
d2e1ffa259f5a06bab5b1c77bda5012256b984b44d833fd09bd29bd5d9aae171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page