Skip to main content

Tweezers

Lightweight Python library for scraping data via the Twitter search API.

from tweezers import Tweezers

Create an instance of Tweezers with API credentials

# Loading Twitter auth credentials from a local JSON file. Get yours here:
# https://developer.twitter.com/en/apps/
import json
import os

fp = os.path.join(os.getcwd(), "credentials.json")
with open(fp) as f:
    credentials = json.load(f)

t = Tweezers(
    api_key=credentials["api_key"],
    api_secret_key=credentials["api_secret_key"],
    access_token=credentials["access_token"],
    access_token_secret=credentials["access_token_secret"]
)

Searching returns an instance of a class TweezerSearch, which contains various data attributes returned by the Twitter API:

s = t.search(search_term="bitcoin", total=1000, result_type="recent")
# All the tweet results are returned in a Pandas DataFrame:
s.results_df.head()

Metadata

Release files for tweezers 0.0.2

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

Source distribution (sdist)

Source distribution for tweezers 0.0.2
File Size Uploaded Provenance Actions
tweezers-0.0.2.tar.gz 10.7 kB Without provenance Details for tweezers-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / tweezers-0.0.2.tar.gz

Download URL tweezers-0.0.2.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f7c3d89bd5db080cf1631e2c1f5a941f17ef06cb54b005035c2dd8ce5b7ea183
BLAKE2b-256 checksum
How to use checksums
1c7a30491ccdf248a568bce80997649262420539eeb067d3108f9caa8a3eb0d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release files / tweezers-0.0.2-py3-none-any.whl

Download URL tweezers-0.0.2-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da528347ad14ee38719b2d4ba75ea8dc5154a6de7884a4e3f47c9cfbfbc3a549
BLAKE2b-256 checksum
How to use checksums
a9f0896ce5c134ec94a6852f90243b081a816c2723ebcb4be461b04824048b8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Security for tweezers 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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