Skip to main content

Python library to crawl user data from sharkey instances

Project description

Python library to crawl user notes from sharkey instances

Latest Version on PyPI GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Python wrapper for the /users/notes endpoint of Sharkey (and probably also Misskey). You can use this to crawl the public posts of a user.

Installation

You can install the package via poetry (or another tool of your choosing):

poetry add sharkey-crawler

Usage

from sharkey_crawler import SharkeyServer

SharkeyServer('example.org').user_notes(
    user_id='xxxxxxxxxx',
    allow_partial=True, 
    with_channel_notes=True,
    with_renotes=False,
    with_replies=False,
    with_files=False,
    limit=10,
    since_id=None,
    since_date=None,
    until_id=None,
    until_date=None
)

Checkout the docstring for more usage information.

Testing

# All
./venv/bin/pytest -m ""

# Unit
./venv/bin/pytest -m "unit"

# Integration
./venv/bin/pytest -m "integration"

# Unit and Integration
./venv/bin/pytest -m "integration or unit"

Development

Installing new dependencies

Either add the dependency to the optional dependencies, or create a new dependency within the [project] namespace, e.g.:

[project]
...
dependencies = [
    "requests==2.32.3"
]

Then, install dependencies with flit:

./venv/bin/flit install --only-deps --deps develop

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharkey_crawler-0.0.1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

sharkey_crawler-0.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file sharkey_crawler-0.0.1.tar.gz.

File metadata

  • Download URL: sharkey_crawler-0.0.1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for sharkey_crawler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bc45877497d46e3803e6fd509fb399969386ae6c1e20af9c7baff928e2e1ab87
MD5 a8b41992435fbb56073f0709b0fe48d8
BLAKE2b-256 4219d254658f2f8e61039683056385a4c703b40a686e416a9cdd6e5ea12bae4f

See more details on using hashes here.

File details

Details for the file sharkey_crawler-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sharkey_crawler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66b09897635defc9bb40fd46f1fdd7450141ac1e66be0717c068838dbe256ca8
MD5 b607bdfbdda7bc22d9c2f2f1c27d1e60
BLAKE2b-256 803674923086324c18edadbef9ea64739ac7c7f79fa9bd86dc0e236f6ccac652

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page