sciris-utils
/sciris-utils
Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
Original author description
Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
How it works
- Type Conversion
- Type Checking
- Fuzzy Matching
- Downloading
- Running Shell Commands
- Import by Path
- Help and Debugging
SKILL.md preview
---
name: sciris-utils
description: Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
---
# Sciris Miscellaneous Utilities
Reference for type handling, downloading, and other tools. See full tutorial: `docs/tutorials/tut_utils.ipynb`.
If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.
## Type Conversion
### Merge dicts (handles None)
```python
def my_func(json=None, **kwargs):
default = dict(a=1, b=2)
output = sc.mergedicts(default, json, kwargs) # None inputs are OK
return output
```
### Merge lists (auto append/extend)
```python
sc.mergelists(['a', 'b'], 'c', None, {'d': 1}) # ['a', 'b', 'c', {'d': 1}]
```
### Flexible conversion
```python
sc.tolist('single') # ['single'] — safe to iterate
sc.tolist(['already']) # ['already'] — unchanged
sc.toarray(2) # array([2]) — handles scalars (np.array doesn't)
sc.toarray([1, 2, 3]) # array([1, 2, 3])
sc.cat(1, [2, 3], np.array([4, 5])) # array([1, 2, 3, 4, 5]) — concatenates
```
### Auto-incrementing list
```python
output = sc.autolist()
for item in data:
output += f'Result: {item}' # Appends automatically with +=
```
## Type Checking
```python
sc.isnumber(3) # True
sc.isnumber(3.14j) # True
sc.isnumber('3') # False
```
## Fuzzy Matching
```python
sc.suggest('Scirys', ['Python', 'NumPy', 'Sciris']) # 'Sciris'
```
## Downloading
```python
data = sc.download(urls, save=False) # Download to memory (parallel)
sc.download(urls, save=True) # Download to disk
```
## Running Shell Commands
```python
out = sc.runcommand('ls *.py', printoutput=True) # Use instead of Popen()
```
## Import by Path
```python
old = sc.importbypath('sim_v1/sim.py') # Import without sys.path
new = sc.importbypath('sim_v2/sim.py') # Two modules with same name
plt = sc.lazyimport('matplotlib.pyplot') # Only imported when first used
```
## Help and Debugging
```python
sc.help('interpol') # Search all Sciris source code
sc.help('interpol', context=True) # With surrounding context
sc.traceback() # Get exception traceback as string
sc.loadtext('file.py') # Load text file as string
sc.pp(obj) # Pretty-print any object
```
Versions
The database has no other skills named sciris-utils.
Database snapshot: 13.11.2026 · package version cc3609acaa2e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95sciris-dates
Use when working with dates, times, or timing in Sciris — sc.timer, sc.tic, sc.toc, sc.date, sc.daterange, sc.datedelta, sc.now, sc.getdate, sc.time, sc.timedsleep, sc.randsleep, date format conversion, or timing code blocks. - 95sciris-files
Use when saving or loading files with Sciris — sc.save, sc.load, sc.savejson, sc.loadjson, sc.saveyaml, sc.readyaml, sc.savearchive, sc.loadarchive, sc.savefig, sc.loadmetadata, sc.getfilelist, sc.thispath, sc.makefilepath, sc.rmpath, sc.metadata, sc.compareversions, sc.require,… - 100gsap-utils
Official GSAP skill for gsap.utils — clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap, pipe. Use when the user asks about gsap.utils, clamp, mapRange, random, snap, toArray, wrap, or helper utilities in GSAP. - 100gsap-utils
Official GSAP skill for gsap.utils — clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap, pipe. Use when the user asks about gsap.utils, clamp, mapRange, random, snap, toArray, wrap, or helper utilities in GSAP. - 95api-utils
API reference for all utilities exported from `@cyanheads/mcp-ts-core/utils`. Use when looking up utility method signatures, options, peer dependencies, or usage patterns. - 95api-utils
API reference for all utilities exported from `@cyanheads/mcp-ts-core/utils`. Use when looking up utility method signatures, options, peer dependencies, or usage patterns.