
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Common tools
pip install -U ariestools
python3.7+
graphql query
from ariestools import graphql_query
_res_json = graphql_query(query_url, payload)
json path
from ariestools import JsonPath
_json_dict = {'k': 'v'}
_jp1 = JsonPath(_json_dict)
print(_jp1.path("$.k"))
_json_list = [{'k': 'v'}]
_jp2 = JsonPath(_json_list)
print(_jp2.path("$.[0].k"))
_json_complex = {'k': [{'k': 'v'}]}
_jp3 = JsonPath(_json_complex)
print(_jp3.path("$.k.[0].k"))
load json file
from ariestools import load_json
_json = load_json(json_file_path)
format obj to json str
from ariestools.json_util import obj2jsonstr
class Foo:
def __init__(self):
self.a = 1
self.b = 2
self.bar = Bar()
class Bar:
def __init__(self):
self.x = 1
self.y = 2
print(obj2jsonstr(Foo()))
{
"a": 1,
"b": 2,
"bar": {
"x": 1,
"y": 2
}
}
get relative path & load yaml
import os
from ariestools import replace_sys_path, load_yaml
_yaml = load_yaml(os.path.realpath('') + replace_sys_path("/.xxx/xxx.yaml"))
parse time
t_time_str = '2019-08-01 00:00:00.000'
t_dt = parse(t_time_str) # 2019-08-01T00:00:00+08:00
print(get_local_time(t_dt)) # 2019-08-01 00:00:00.000
print(get_cloud_time(t_dt)) # 1564588800000000000
t_time_str2 = '2019-08-01 00:00:05.000'
t_dt2 = parse(t_time_str2)
print(get_dt_duration_seconds(t_dt2, t_dt)) # 5
print(t_dt2 > t_dt) # True
print(now()) # 1576224515111
FAQs
Common Tools for python lib
We found that ariestools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.