Skip to main content

1 ipgdrive

PyPI-Status PyPI-Versions LICENCE

A service that writes the public ip address of the host computer to a file on Google Drive.

# after setting up ~/.config/ipgdrive/cfg.json
# setup a cronjob to write the public ip address to
# Google doc every 5 minutes
ipgdrive setupjob -m 5

1.1 Installation

pip install ipgdrive

1.2 Setup

To enable Google Drive access, follow the instructions here to create a service account with Google Drive access, and create a json key file for it.

Don’t forget to follow all the above instructions, including sharing your spreadsheet with an email you have in your json_key['client_email'] (Otherwise you’ll get a SpreadsheetNotFound or an APIError with "PERMISSION_DENIED" exception when trying to open it).

Place this file in the ~/.config/ipgdrive/ folder, and rename it to google_drive_service_account_key.json.

Additionally, create a cfg.json file inside the ~/.config/ipgdrive/ folder, and populate it with the following values:

{
    "spreadsheet_name": "my_server_public_ip",
    "username": "momo",
    "freq_minutes": 5
}

The username is for the user running the process on the server, NOT the Google account username.

1.3 Use

# after setting up ~/.config/ipgdrive/cfg.json
# setup a cronjob to write the public ip address to
# Google doc every 5 minutes
ipgdrive setupjob -m 5

1.4 Contributing

Package author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.

1.4.1 Installing for development

Clone:

git clone git@github.com:shaypal5/ipgdrive.git

Install in development mode, including test dependencies:

cd ipgdrive
pip install -e '.[test]'

1.4.2 Running the tests

To run the tests use:

cd ipgdrive
pytest

1.4.3 Adding documentation

The project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings. When documenting code you add to this project, follow these conventions.

Additionally, if you update this README.rst file, use python setup.py checkdocs to validate it compiles.

1.5 Credits

Created by Shay Palachy (shay.palachy@gmail.com).

Metadata

Release files for ipgdrive 0.0.12

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

Built distribution (wheel)

Table of built distributions (wheels) for ipgdrive 0.0.12
File Interpreter ABI Platform
ipgdrive-0.0.12-py3-none-any.whl Python 3 none any Details

Release files / ipgdrive-0.0.12-py3-none-any.whl

Download URL ipgdrive-0.0.12-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73c195d6c5b649ae90ad32b059c7b50fca934d4daf73d73b06669cc417e6744a
BLAKE2b-256 checksum
How to use checksums
96ddeef3fc8ad0c4ba55ed1447034688699d4dbc0329e35cc64aa98b4da9ba16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.0.12 This release

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.3

1 release file

0.0.2

1 release file

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