kaliiiiiiiiii / mecabricks-conversion-matrix-extractor

Extract conversion-matrices for mecabricks using the API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mecabricks-conversion-matrix-extractor

Feel free to test my code!

Getting Started

Dependencies

Installing

  • pip install aiohttp
  • download extractor.py to your local directory

Example script

import asyncio
import json

from extractor import get_bricks
import time


async def main():
    start = time.perf_counter()
    _range = range(1, 19900)
    bricks = await get_bricks(_range, max_conn=100, lang="en", scope="official")
    print("requests/sec. = " + str(
        (_range.stop - _range.start) /
        (time.perf_counter() - start)
    ))
    with open("file.json") as f:
        f.write(json.dumps(bricks))


asyncio.run(main())

Help

Please feel free to open an issue or fork!

Authors

Aurin Aegerter

License

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

Disclaimer

I am not responsible for what you use the code for!!! Also no warranty!

About

Extract conversion-matrices for mecabricks using the API

License:Other


Languages

Language:Python 100.0%