1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

document schema

This commit is contained in:
Kelly Brazil
2022-07-19 07:45:13 -07:00
parent 0ed47fc7ce
commit 450d0d5ddf

View File

@ -11,13 +11,15 @@ Usage (module):
Schema: Schema:
[ {
{ "scheme": string,
"url": string, "netloc": string,
"bar": boolean, "path": string,
"baz": integer "query": { object or null,
} <query-key>: string
] },
"fragment": string or null
}
Examples: Examples:
@ -33,8 +35,14 @@ Examples:
"fragment": "frag" "fragment": "frag"
} }
$ FTP example, etc. $ echo "ftp://localhost/filepath" | jc --url -p
[] {
"scheme": "ftp",
"netloc": "localhost",
"path": "/filepath",
"query": null,
"fragment": null
}
""" """
from urllib.parse import urlparse from urllib.parse import urlparse
from typing import List, Dict from typing import List, Dict