Code Monkey home page Code Monkey logo

trivio's Introduction

TrivIO

An async opentdb API wrapper written in python.

Installation

The repo isn't on pypi yet as it's still in an early dev stage.

if you want to use the current version you can install it manually

git clone https://github.com/CuzImSyntax/TrivIO
cd TrivIO
python setup.py install

Docs

  • The docs are available here.

Simple Example

import trivio
import asyncio

async def main():
    
    client: trivio.Client = trivio.Client(use_token=True)
    questions: trivio.Response = await client.request(trivio.Type.MULTIPLE_CHOICE, 10, trivio.Category.ALL, trivio.Difficulty.EASY)
    await client.close()
    if questions.results: 
        print(questions.results[0].question)
        print(questions.results[0].all_answers)

asyncio.run(main())

Contributing

Contributions are welcome, when you want to make major changes, feel free to open an issue first to discuss the changes

trivio's People

Contributors

cuzimsyntax avatar

Stargazers

 avatar

Watchers

 avatar

trivio's Issues

"error: package directory 'aiohttp==3\8\3' does not exist" when trying to install

When I try to install trivio from the instructions on readme.md I get this issue. Here's the output:
running install
running bdist_egg
running egg_info
writing TrivIO.egg-info\PKG-INFO
writing dependency_links to TrivIO.egg-info\dependency_links.txt
writing top-level names to TrivIO.egg-info\top_level.txt
error: package directory 'aiohttp==3\8\3' does not exist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.