Skip to main content

This is my personal toolkit

Project description

GitHub: https://github.com/xiaoacaia/michael_tools

pypi: https://pypi.org/project/michael-tools

Personal toolkit

测试代码,在 GitHub 工具函数,同级目录下的 test 文件中

需安装:pip install pytest

file_operation

  • create_file(file_path)

  • delete_file(file_path)

  • read_file(file_path)

  • write_to_file(file_path, content)

  • append_to_file(file_path, content)

  • get_unique_filepath(file_name)

  • get_curr_work_dir()

  • get_upper_dir(path=None)

  • path_join(*parts)

json_operation

  • dict_to_str(python_obj)

  • str_to_dict(json_str)

  • read_file_to_dict(file_path)

  • write_dict_to_file(python_obj, file_path)

time_operation

  • get_current_time()

  • get_n_days_ago(n)

  • get_current_time_str()

  • get_current_date_str()

openapi_operation

  • call_model_verbose(prompt)

  • call_model(prompt, model_name="deepseek-r1")

  • ChatSession.load_from_file(file_name)

  • chat.send_message(self, message)

txt_operation

  • remove_trailing_newline(txt)

0.1.3 chat_session

0.0.9 call_model_verbose

0.0.7 add file_op

0.0.6 add openapi_op

0.0.5 add time

Hope it helps you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

michael_tools-0.1.3.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file michael_tools-0.1.3.tar.gz.

File metadata

  • Download URL: michael_tools-0.1.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for michael_tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8303d5da845cbe99df7fb5802a62246549d8ed747f3f9669b4c0abd7e2546ebb
MD5 73b36c74163e4571897b2f695b514c3a
BLAKE2b-256 9b6f19aba1f77e52c2b4839ba5dea2f20d5c1efefec50da14861d1426f0da88a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page