How to use the divvy.Divvy function in divvy

To help you get started, we’ve selected a few divvy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iandees / divvy-dump / divvy.py View on Github external
seconds = int(duration_parts[0][:-1])
                elif len(duration_parts) == 2:
                    seconds = int(duration_parts[0][:-1])*60 + int(duration_parts[1][:-1])

                res.append({
                    "trip_id": tds[0].text,
                    "start_station": tds[1].text,
                    "start_date": tds[2].text,
                    "end_station": tds[3].text,
                    "end_date": tds[4].text,
                    "duration": seconds
                })
        return res

if __name__ == "__main__":
    d = Divvy()
    d.login('iandees', 'password')

    out = csv.DictWriter(open('divvy_rides.csv', 'w'), ['trip_id', 'start_station', 'start_date', 'end_station', 'end_date', 'duration'])

    out.writeheader()
    for ride in d.get_rides():
        out.writerow(ride)

divvy

A python-based configuration manager for portable environment configurations

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis