Skip to main content

A Python wrapper for the csfloat API

Project description

csfloat.py

An API wrapper for the CSFloat API written in Python.

Installing

Python 3.10 or higher is required

To install the library, you can just run the following command:

# Linux/macOS
$ python3 -m pip install -U csfloat.py

# Windows
> py -3 -m pip install -U csfloat.py

To install the development version, do the following:

$ git clone https://github.com/PaxxPatriot/csfloat.py.git
$ cd csfloat.py
$ python3 -m pip install -U .

Quick Example

import asyncio

import csfloat

async def main():
  client = csfloat.Client()
  # Set your personal API key, which you can get from https://csfloat.com/profile -> Developers -> + New Key
  client.set_api_key(api_key="YOUR API KEY HERE")

  # Get all listed CS2 items on csfloat.com and print the name to the console
  listings = await client.fetch_all_listings()
  async for listing in listings:
    print(listing.item.name)

if __name__ == "__main__":
    asyncio.run(main())

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

csfloat_py-0.0.1.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

csfloat.py-0.0.1-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

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