Skip to content

Instantly share code, notes, and snippets.

@commonism
commonism / openapi3.yaml
Last active July 24, 2023 19:41
OpenAPI3.1 - type list null
openapi: 3.1.0
info:
title: ''
version: 0.0.0
servers:
- url: http://127.0.0.1/api
security:
- {}
@commonism
commonism / netbox_api_test.py
Created August 9, 2023 13:35
netbox_api_test.py
import asyncio
import logging
from typing import Dict
from pathlib import Path
import aiopenapi3
import httpx
import pytest
import pytest_asyncio
@commonism
commonism / pagination_test.py
Created August 30, 2023 06:32
pagination parameter caching
# https://github.com/Dorthu/openapi3/issues/110
import asyncio
import dataclasses
import random
import sys
import string
import uuid
if sys.version_info >= (3, 9):
from typing import List, Annotated
@commonism
commonism / mattermost-dl.py
Created October 25, 2023 09:13 — forked from RobertKrajewski/mattermost-dl.py
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json