Skip to main content

toolslm

This is a work in progress…

Install

pip install toolslm

How to use

Context creation

toolslm has some helpers to make it easier to generate XML context from files, for instance folder2ctx:

print(folder2ctx('samples', prefix=False, file_glob='*.py'))
<documents><document index="1"><src>
samples/sample_core.py
</src><document-content>
import inspect
empty = inspect.Parameter.empty
models = 'claude-3-opus-20240229','claude-3-sonnet-20240229','claude-3-haiku-20240307'
</document-content></document></documents>

JSON doesn’t map as nicely to XML as the ft data structure from fastcore.xml, but for simple XML trees it can be convenient. The json_to_xml function handles that conversion:

a = dict(surname='Howard', firstnames=['Jeremy','Peter'],
         address=dict(state='Queensland',country='Australia'))
print(json_to_xml(a, 'person'))
<person>
  <surname>Howard</surname>
  <firstnames>
    <item>Jeremy</item>
    <item>Peter</item>
  </firstnames>
  <address>
    <state>Queensland</state>
    <country>Australia</country>
  </address>
</person>

Download files

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

Source Distribution

toolslm-0.3.46.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolslm-0.3.46-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file toolslm-0.3.46.tar.gz.

File metadata

  • Download URL: toolslm-0.3.46.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for toolslm-0.3.46.tar.gz
Algorithm Hash digest
SHA256 4143961c1728e271e3efe8e82a9441c12023186bf39d951a1b30c03439b76d27
MD5 9fff96306cc0785c139b20d3df047c79
BLAKE2b-256 2b99e310ba1adc1178e9e9d0b4a08f72c118a219b5e9578e8efbf5d6e86b3320

See more details on using hashes here.

File details

Details for the file toolslm-0.3.46-py3-none-any.whl.

File metadata

  • Download URL: toolslm-0.3.46-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for toolslm-0.3.46-py3-none-any.whl
Algorithm Hash digest
SHA256 200962c53e80dd55e9bf0d248c25783b3ad71c505febb57249f4caa5235f2a59
MD5 4190afd6cb23792c1abf786d1d53b196
BLAKE2b-256 9c3dfa3416c3a442763e9a3a42622f5cd1fa0c6817a29dc01135807c0c29c526

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.48

2 files

0.3.47

2 files

This release

0.3.46 This release

2 files

0.3.45

2 files

0.3.44

2 files

0.3.43

2 files

0.3.42

2 files

0.3.41

2 files

0.3.40

2 files

0.3.39

2 files

0.3.38

2 files

0.3.37

2 files

0.3.36

2 files

0.3.35

2 files

0.3.34

2 files

0.3.33

2 files

0.3.32

2 files

0.3.31

2 files

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page