Skip to content

kiraware/paspybin

Repository files navigation

paspybin

Test CodeQL Docs codecov pre-commit security: bandit Checked with mypy Ruff pypi python License: MIT

paspybin is an asynchronous API wrapper for the Pastebin API, designed to streamline interaction with Pastebin's services in Python. It enables users to leverage Pastebin's functionality asynchronously, enhancing performance and usability.

Key Features

  • Asynchronous Operations: Utilizes asyncio and aiohttp for efficient API requests.
  • Data Schema: Built with Python's dataclass for clear and structured data representation.
  • Comprehensive Documentation: Explore detailed documentation for seamless integration and usage.

Installation

pip install paspybin

Usage

import asyncio
import os

from paspybin import Paspybin

PASTEBIN_API_DEV_KEY = os.environ["PASTEBIN_API_DEV_KEY"]
PASTEBIN_USERNAME = os.environ["PASTEBIN_USERNAME"]
PASTEBIN_PASSWORD = os.environ["PASTEBIN_PASSWORD"]

async def main():
    async with Paspybin(PASTEBIN_API_DEV_KEY) as paspybin:
        await paspybin.login(PASTEBIN_USERNAME, PASTEBIN_PASSWORD)
        async for paste in paspybin.pastes.get_all():
            print(paste)

asyncio.run(main())

Docs

You can start reading the documentation here.

Contributing

We welcome contributions to enhance paspybin! Please review our contributing guidelines. before getting started.

Acknowledgements

We would like to thank Pastebin for providing API services and also good documentation for using the API.