General programming utilities from Pew Research Center
Project description
pewtils
Pewtils is a package of useful programming utilities developed at the Pew Research Center over the years. Most of the functions in Pewtils can be found in the root module, while a handful of submodules contain more specialized utilities for working with files, web resources, and regular expressions.
Installation
To install, you can use pip
:
pip install git+https://github.com/pewresearch/pewtils#egg=pewtils
Or you can install from source:
git clone https://github.com/pewresearch/pewtils.git
cd pewtils
python setup.py install
Installation Troubleshooting
Using 64-bit Python
Some of our libraries require the use of 64-bit Python. If you encounter errors during installation that are related to missing libraries, you may be using 32-bit Python. We recommend that you uninstall this version and switch to a 64-bit version instead. On Windows, these will be marked with x86-64
; you can find the latest 64-bit versions of Python here.
Installing ssdeep
ssdeep is an optional dependency that can be used by the get_hash
function in Pewtils. Installation instructions for various Linux distributions can be found in the library's documentation. The ssdeep Python library is not currently compatible with Windows. Installing ssdeep on Mac OS may involve a few additional steps, detailed below:
- Install Homebrew
- Install xcode
xcode-select --install
- Install system dependencies
brew install pkg-config libffi libtool automake ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- Install ssdeep with an additional flag to build the required libraries
BUILD_LIB=1 pip install ssdeep
- If step 4 fails, you may need to redirect your system to the new libraries by setting the following flags:
Do this and try step 4 again.export LIBTOOL=`which glibtool` export LIBTOOLIZE=`which glibtoolize`
- Now you should be able to run the main installation process detailed above.
Documentation
Please refer to the official documentation for information on how to use this package.
Use Policy
In addition to the license, Users must abide by the following conditions:
- User may not use the Center's logo
- User may not use the Center's name in any advertising, marketing or promotional materials.
- User may not use the licensed materials in any manner that implies, suggests, or could otherwise be perceived as attributing a particular policy or lobbying objective or opinion to the Center, or as a Center endorsement of a cause, candidate, issue, party, product, business, organization, religion or viewpoint.
Issues and Pull Requests
This code is provided as-is for use in your own projects. You are free to submit issues and pull requests with any questions or suggestions you may have. We will do our best to respond within a 30-day time period.
Recommended Package Citation
Pew Research Center, 2020, "pewtils" Available at: github.com/pewresearch/pewtils
Acknowledgements
The following authors contributed to this repository:
- Patrick van Kessel
- Regina Widjaya
- Skye Toor
- Emma Remy
- Onyi Lam
- Brian Broderick
- Galen Stocking
- Dennis Quinn
About Pew Research Center
Pew Research Center is a nonpartisan fact tank that informs the public about the issues, attitudes and trends shaping the world. It does not take policy positions. The Center conducts public opinion polling, demographic research, content analysis and other data-driven social science research. It studies U.S. politics and policy; journalism and media; internet, science and technology; religion and public life; Hispanic trends; global attitudes and trends; and U.S. social and demographic trends. All of the Center's reports are available at www.pewresearch.org. Pew Research Center is a subsidiary of The Pew Charitable Trusts, its primary funder.
Contact
For all inquiries, please email info@pewresearch.org. Please be sure to specify your deadline, and we will get back to you as soon as possible. This email account is monitored regularly by Pew Research Center Communications staff.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pewtils-1.1.5.tar.gz
.
File metadata
- Download URL: pewtils-1.1.5.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec93fced5daeb11ccadd17ddf6b9bf0d46807034f40c1f516771a2ada266dcf |
|
MD5 | d796528e3c202ac2a397c106eb1baa5b |
|
BLAKE2b-256 | 68d91ace017242ba18b9913af0ebc0ca652eae62a11b426f654ec72704c3941a |
File details
Details for the file pewtils-1.1.5-py3-none-any.whl
.
File metadata
- Download URL: pewtils-1.1.5-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d565c5255d8b7d793e289f714324c034aa6092aeccf47c3df2d46143bda930b |
|
MD5 | ff63c79e86ca9d63ecb0c5e2144b27c4 |
|
BLAKE2b-256 | e5976d562014703077b808b1eea47862f3d3f58d8187462bb83e54443f532429 |