semvec/pypi-packages huggingface dataset:
toggl2webcal 1.0
Export toggl to webcal file - uses sql database to store toggl data to get around API limits
License: MIT
Keywords: toggl webcal

# toggl2cal

My tool that exports toggl as webcal file that I serve from my server. 

# Install:

```
    $ pip3 install toggl2webcal --user
```

# Readme

```
usage: toggl2webcal [-h] [-d DAYS] [--no-import] [--no-export] [-o OUT]
                    token database

Export toggl data to webcal file

positional arguments:
  token                 Toggl token
  database              SQL alchemy database connector

optional arguments:
  -h, --help            show this help message and exit
  -d DAYS, --days DAYS  number of days to look back
  --no-import           Don't run import from toggl
  --no-export           Don't run export to webcal
  -o OUT, --out OUT     output path for the webcal file

```

# Example

```
 toggl2webcal TOGGL_TOKEN sqlite:///time.sqlite 
 toggl2webcal TOGGL_TOKEN postgresql://myself@localhost 
```
google-env 0.4.0
Script to populate .env file from a Google Sheet
License: MIT
Requires Python: >=2.7.0

# Google Env

A simple utility which pulls development-time values from a Google spreadsheet. This
allows you to share dev secrets in a semi-secure way.

## Usage

1. You need an Oauth credentials JSON file. One person needs to register an
Oauth app in the Google Console and then download the credentials JSON file.
Place this file in `$HOME/google_env_creds.json`.

2. Now create a `.env` file in your code project. Reference the spreadsheet
which contains your secrets at the top of the file:

`.env`:

    # GOOGLE_ENV: https://docs.google.com/spreadsheets/d/17fcDBp5tez9JFtRwucDW5-wq3jgmzq8s-oWcnUljyR0!Sheet1

Note that the sheet name should be after the '!' at the end.

3. Install the `google_env` package:

    `pip install google_env`

4. Now run the `google_env` script directory containing your .env file

    `$ google_env`

The first time you run it you will be sent through the Google Oauth flow in the browser.
Your access key to the spreadsheet will then be cached in a local file in
`~/.google_env_token`.

Now the contents of your spreadsheet are downloaded and inserted into the `.env`
file. Your spreadsheet should have 2 columns, the key and the value, with no header.

So if your sheet looks like this:

|   | A          | B            |
|---|------------|--------------|
| 1 | key1       | mysecretkey1 |
| 2 | AWS_ACCESS | foobar       |
---------------------------------

Then the resulting .env file will be rewritten as:

    # GOOGLE_ENV: https://docs.google.com/spreadsheets/d/17fcDBp5tez9JFtRwucDW5-wq3jgmzq8s-oWcnUljyR0
    key1=mysecretkey1
    AWS_ACCESS=foobar
    # END_GOOGLE_ENV

Note that you should leave the closing comment line. This will allow you to
re-run `google_env` any time to update keys from the spreadsheet.

If you need to override any values, simply add a second assignment for that
key lower down in your `.env` file.

## Doing other things with Google Sheets

This package can be used to easily retrieve information from any Google Sheet.

     > import google_env
     > for row in google_env.read_sheet(sheet_id, sheet_range):
           # row will be an array of column values for each row in the sheet
           print(row)

Where `sheet_id` is like `1mhs7mW7dBK_lhNYB4hZFwdF1QXWSEzl6ITsY50DGx9M` and
`sheet_range` is a Sheets range like `<name>!<range spec>` like
`Sheet1!A1:G20`.
django-purge 1.0.0
A reusable Django app for purging database records (e.g., logs).
License: MIT

Purge
#####

.. inclusion-marker-do-not-remove

.. image:: https://travis-ci.org/gregschmit/django-purge.svg?branch=master
    :alt: Build Status
    :target: https://travis-ci.org/gregschmit/django-purge

.. image:: https://readthedocs.org/projects/django-purge/badge/?version=latest
    :alt: Documentation Status
    :target: https://django-purge.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/pypi/v/django-purge
    :alt: PyPI
    :target: https://pypi.org/project/django-purge/

.. image:: https://coveralls.io/repos/github/gregschmit/django-purge/badge.svg?branch=master
    :alt: Coverage Report
    :target: https://coveralls.io/github/gregschmit/django-purge?branch=master

Documentation: https://django-purge.readthedocs.io

Source: https://github.com/gregschmit/django-purge

PyPI: https://pypi.org/project/django-purge/

Purge is a reusable Django app for regularly purging old database entries, like
logs.

**The Problem**: Tables/models like sessions and logs can grow without limit.

**The Solution**: This app allows you to schedule database purging of old
records. You can also make FilePurgers which can purge old files based on
datestamps in the filename or timestamps in the meta-data (atime/mtime/ctime).

How to Use
##########

.. code-block:: shell

    $ pip install django-purge

Include :code:`purge` in your :code:`INSTALLED_APPS`. Then, create your
database purgers or file purgers in the admin interface.

Then, either periodically call the :code:`purge` management command (e.g., via a
system cronjob), or install and configure :code:`django-cron` (add
:code:`purge.cron` to your :code:`CRON_CLASSES` in your
:code:`settings.py`). The builtin :code:`CronJob` class is set to run every 4
hours. You can change this by altering your :code:`settings.py` and adding
:code:`PURGE_CRON_RUN_AT_TIMES` to an array of times you want to run the job at
(e.g., :code:`['1:00']` to run at 1am).

Contributing
############

Email gschmi4@uic.edu if you want to contribute. You must only contribute code
that you have authored or otherwise hold the copyright to, and you must
make any contributions to this project available under the MIT license.

To collaborators: don't push using the :code:`--force` option.

Dev Quickstart
##############

Purge comes with a `settings.py` file, technically making it a Django project as
well as a Django app. First clone, the repository into a location of your
choosing:

.. code-block:: shell

    $ git clone https://github.com/gregschmit/django-purge

Then you can go into the :code:`django-purge` directory and do the initial
migrations and run the server (you may need to type :code:`python3` rather than
:code:`python`):

.. code-block:: shell

    $ cd django-purge
    $ python manage.py makemigrations
    $ python manage.py migrate
    $ python manage.py createsuperuser
    ...
    $ python manage.py runserver

Then you can see the models at http://127.0.0.1:8000/admin.