Skip to main content

Parsons

Downloads PyPI - Python Version PyPI CircleCI

A Python package that provides a simple interface to a variety of utilities and tools frequently used by progressive organizations, political and issue campaigns, activists, and other allied actors.

Parsons offers simplified interactions with these services and tools, including a growing number of CRMs, organizing tools, cloud compute service providers, as well as tools to easily transform data in transit.

This project is maintained by The Movement Cooperative and is named after Lucy Parsons. The Movement Cooperative is a member-led organization focused on providing data, tools, and strategic support for the progressive community.

Parsons is only supported for Python 3.9-12.

Table of Contents

License and Usage

Usage of Parsons is governed by a modified Apache License with author attribution statement.

Documentation

To gain a full understanding of all of the features of Parsons, please review the Parsons documentation.

Installation

PYPI

You can install the most recent release by running: pip install parsons[all]

Install from Github

To access the most recent code base that may contain features not yet included in the latest release, download this repository and then run python -m pip install git+https://github.com/move-coop/parsons.git.

Docker Container

We have a Parsons Docker container hosted on DockerHub for each release of Parsons, including the latest.

Quickstart

For this Quickstart, we are looking to generate a list of voters with cell phones using a dummy data file. We use the assert statements to verify that the data has been loaded correctly.

# Download the Census data from the Parsons GitHub repository
from parsons import GitHub

github = GitHub()
dummy_data = github.download_table('move-coop/parsons', 'docs/quickstart.csv')
assert dummy_data.num_rows == 1000  # Check that we got all 1,000 people

# Filter down to people with cell phones
people_with_cell_phones = dummy_data.select_rows(lambda row: row['is_cell'] == 'true')
assert people_with_cell_phones.num_rows == 498  # Check that we filtered down to our 498 people

# Extract only the columns we need (first name, last name, phone number)
people_with_cell_phones = people_with_cell_phones.cut('first_name', 'last_name', 'phone_number')
assert people_with_cell_phones.columns == ['first_name', 'last_name', 'phone_number']  # Check columns

# Output the list to a local CSV file
filename = people_with_cell_phones.to_csv()  # filename will be the path to the local CSV file

# In order to upload data to a Google Sheet, you will need to set the GOOGLE_DRIVE_CREDENTIALS
# environment variable
from parsons import GoogleSheets

sheets = GoogleSheets()
sheet_id = sheets.create_spreadsheet('Voter Cell Phones')
sheets.append_to_sheet(sheet_id, people_with_cell_phones)

Community

We hope to foster a strong and robust community of individuals who use and contribute to further development. Individuals are encouraged to submit issues with bugs, suggestions and feature requests. Here are the guidelines and best practices for contributing to Parsons.

You can also stay up to date by joining the Parsons Slack group, an active community of Parsons contributors and progressive data engineers. For an invite, just reach out to engineering+parsons@movementcooperative.org!

Metadata

Release files for parsons 4

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 parsons 4
File Interpreter ABI Platform
parsons-4-py3-none-any.whl Python 3 none any Details

Release files / parsons-4-py3-none-any.whl

Download URL parsons-4-py3-none-any.whl
Size 480.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b239760cf4be6eaf64b157be3b36f0b2346c0ce95284b10c05035076b96c5354
BLAKE2b-256 checksum
How to use checksums
4ed59a43323f7e737a3b8b313fdd4467191e56ca80c4d6f19b6cb48b23e16283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

6.1.0

1 release file

6.0.0

1 release file

5.4.0

1 release file

5.2.0

1 release file

5.0.0

1 release file

This release

4 This release

1 release file

3.2.0

1 release file

3.1.0

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

1 release file

1.1.0

2 release files

1.0.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.2

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.11.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.5.0

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