# AnswerDotAI/fastcore: Python utilities for fastai development, and what v2 changed

> fastcore is a pure-Python utility library with no runtime dependencies, built to add Ruby-style mixins, Haskell-style currying and NumPy-style list handling to ordinary Python. Version 2 removed several long-standing APIs and now requires Python 3.11 or later.

**AnswerDotAI/fastcore** — FastCore is an AI-inference toolkit focused on reliable runtime orchestration, tool integrations, and rapid local experimentation.

- Repository: https://github.com/AnswerDotAI/fastcore
- Website: http://fastcore.fast.ai
- Stars: 1,105 · Forks: 295
- Language: Jupyter Notebook
- License: Apache-2.0
- Published: 2026-08-08 · Updated: 2026-08-18 · Language: en
- Canonical page: https://hysenlabs.com/projects/answerdotai-fastcore

## The gap fastcore fills in plain Python

fastcore is not an AI framework. It is a utility layer that fastai and its surrounding projects are built on, and it is published under Apache-2.0 by Jeremy Howard and Sylvain Gugger. The README frames the motivation in one line: rather than bake everything into the language, Python lets the programmer customize it, and fastcore uses that flexibility to borrow from other languages. The borrowings are named explicitly, mixins from Ruby and currying, binding and more from Haskell. It also describes itself as adding missing features and cleaning up rough edges in the standard library, with parallel processing and NumPy-style operations on Python's list type as the examples. The audience is therefore narrower than the name suggests. If you are writing ordinary application code and never subclass a built-in or chain list operations, most of what fastcore exports will sit unused. The people who get value are those writing libraries in the fastai style, notebook-first developers, and anyone who wants the specific ergonomics of L, patch, store_attr, delegates or the enhanced thread and process pool executors. The pyproject.toml describes the package in one phrase, Python supercharged for fastai development, and that is an honest summary of the scope.

## fastcore v2: what the breaking changes actually removed

The README carries a note about fastcore v2, released in July 2026, which removed or relocated APIs that had accumulated better alternatives. The list is concrete and worth reading before you upgrade. Param is gone from fastcore.script, replaced by plain type annotations with docments or typing.Annotated[type, "help"], optionally with a dict of argparse arguments. The star-family methods on L, meaning starmap, starfilter and the other star* and rstar* variants, are replaced by the star and rstar function adapters that compose with every L method, so t.map(star(f)) is the new form. spread is replaced by star, and dspread is renamed to dstar. Async helpers moved into a new fastcore.aio module, including run_sync, iter_sync and ctx_sync from net, and maybe_await, then, mapa, acache, reawaitable and is_async_callable from xtras. Config and the config file functions moved from foundation to xtras. fastcore.net lost its request builders urlrequest, urlsend, do_request and urlcheck, and clean_type_str is gone. parallel_gen was removed entirely, with the README pointing at the standard library ProcessPoolExecutor initializer pattern as the replacement. The escape hatch is stated plainly: if you need the old APIs, pin fastcore<2. Also note the version requirement changed. The v2 note says Python 3.11 or later is now required, while pyproject.toml still lists requires-python as >=3.10, so the two files disagree and the README note is the more recent statement.

## Installing fastcore and running a first L pipeline

The README gives two install paths, conda install fastcore -c fastai if you use Anaconda, which it recommends, or pip install fastcore. For an editable install you clone the repository and run pip install -e ".[dev]". The dev extra is defined in pyproject.toml and pulls in numpy, nbdev>=3.3.2, matplotlib, pillow, torch, pandas, nbclassic, pysym2md>=0.0.6, llms-txt, plum-dispatch and remold, so the editable route is considerably heavier than the plain install. The README states fastcore is tested on Ubuntu, macOS and Windows, using the runner versions shown with the -latest suffix in GitHub's runner documentation.

The first real use is L, which the README calls a drop-in replacement for list with extra superpowers. The example below is copied from the README and exercises collection indexing, map, filter, in-place append and unique, with fastcore's own test_eq assertions so you see the expected values inline.

```python
from fastcore.foundation import L
from fastcore.test import test_eq

x = L(1,2,3,4)
test_eq(x[[0,3]], [1,4])               # index with a collection
test_eq(x.map(lambda o:o*2), [2,4,6,8])
test_eq(x.filter(lambda o:o>2), [3,4])
x += [5]
test_eq(x.unique(), [1,2,3,4,5])
```

If those assertions pass, the install is working. The README also advises liberal imports, saying the library is designed for safe wildcard imports, so from fastcore.utils import * or fastcore.all is the intended style rather than a smell. The README notes that if you use that path, most of the v2 changes will not affect you, which makes it the safest import for existing code.

The project also ships a docker-compose.yml for a notebook environment. Its notebook service is built on the fastai/codespaces image, runs pip install -e ".[dev]" and then starts jupyter notebook on port 8080 with the token and password set to empty strings, which is convenient locally and clearly not a configuration to expose. The same file defines a watcher service running nbdev-build-docs on any .ipynb change and a jekyll service on port 4000 for the docs site.

## Where fastcore is the wrong tool

The clearest failure mode is the v2 boundary itself. If your codebase imports Param from fastcore.script, calls spread or dspread, uses parallel_gen, or builds requests through fastcore.net's urlrequest and urlcheck, upgrading silently breaks it. The README's own answer is to pin fastcore<2, which means you carry an old release rather than migrate, and that decision has to be made per project. The second constraint is the Python version. The v2 note requires 3.11 or later while pyproject.toml declares >=3.10, so anyone on 3.10 reading only the packaging metadata will get a different answer than someone reading the README. Treat the README as authoritative and check your interpreter before upgrading.

The design philosophy is also a limitation. fastcore patches built-in classes, encourages wildcard imports and replaces list with a custom type. Those choices are deliberate and the README defends them, but they make code harder to read for someone who has not learned the library, and they put fastcore types into your public signatures. A team that enforces explicit imports or forbids monkeypatching will find the core idioms at odds with its style guide. The README also does not document rollback beyond the pin fastcore<2 line, so if you upgrade and something breaks, downgrading the pin is the only recovery path the material describes. Finally, this is a utility library, not an inference engine. Despite the framing around AI work, nothing in the README or pyproject.toml describes model loading, serving or GPU orchestration. If you arrived looking for a runtime for AI inference, you are in the wrong repository.

## fastcore against the standard library and toolz

The honest comparison is not against another AI toolkit but against writing the same helpers yourself or importing a smaller functional library. The README names its own alternative in one case: parallel_gen is removed and the standard library ProcessPoolExecutor initializer pattern replaces it, with fastai's parallel_tokenize cited as the recipe. That is an admission that for some of what fastcore offers, the standard library is now sufficient. The difference is ergonomics. fastcore's ThreadPoolExecutor and ProcessPoolExecutor are described as enhanced, and the library ships its own test helpers such as test_eq, test_ne and test_close that produce more informative assertion output than a bare assert. If you already use pytest, that value overlaps with what you have.

For the functional pieces, compose, maps and filter_ex occupy the same ground as a library like toolz, and currying and binding are the Haskell-inspired features the README calls out. The practical difference is that fastcore is a single package with no required dependencies and a stated focus on fastai development, while a dedicated functional library will go deeper on composition and stay out of your class definitions. fastcore's distinguishing move is patch, which adds methods to existing classes including built-ins without subclassing, and store_attr for __init__ bodies. Those have no direct equivalent in a functional utility library, and they are the reason fastcore is hard to swap out once you use them. If you only want L and the test helpers, a lighter dependency is reasonable. If you want patch and delegates, there is no drop-in replacement here.

## Maintenance, releases and the licence position

The repository is not archived. The most recent push recorded is 2026-08-26, which is the same timestamp as the 2.2.16 release, and it follows 2.2.15 on 2026-08-25 and 2.2.14 on 2026-08-23. Three releases in four days suggests a patch cadence rather than a long release cycle, and the version is read dynamically from fastcore.__version__ by setuptools, so the tag and the package version are meant to agree. The project uses nbdev, with the README carrying an autogenerated warning at the top and pyproject.toml declaring an nbdev entry point plus a custom tool.nbdev section, which means the documentation is built from notebooks and the README itself is generated. That is worth knowing before you send a pull request editing README.md directly. The repository also carries CHANGELOG.md, CONTRIBUTING.md and CODE_OF_CONDUCT.md at the top level, and the dev extra pins nbdev>=3.3.2, so contributing requires that toolchain rather than a plain source checkout.

On licensing, fastcore is Apache-2.0, declared both in the LICENSE file and in pyproject.toml as license = {text = "Apache-2.0"}. Apache-2.0 is a permissive licence with an explicit patent grant and a requirement to preserve notices, which matters if you vendor the source rather than depend on the package. It is compatible with being used inside closed-source products, but this is not legal advice and the terms that apply to you depend on how you distribute. The one packaging detail worth flagging is that fastcore is a dependency of fastai, so if you install fastai you are already on this licence whether or not you import fastcore directly.

## Conclusion

Adopt fastcore if you already write Python 3.11 or later and want L, patch, store_attr, delegates or the parallel executors without pulling in a dependency tree; the package declares no required dependencies, so the cost of trying it is one pip install. Skip it if you are pinned below 3.11 or if you rely on Param, spread, dspread, parallel_gen or the request builders that v2 removed, in which case the README points at pinning fastcore<2 rather than migrating. Before committing, verify which of your imports come from fastcore.utils or fastcore.all, since the README states that path is mostly unaffected by the v2 breaking changes, and check the CHANGELOG.md entry for the version you land on.

## FAQ

### What is fastcore?

fastcore is a Python utility library from AnswerDotAI, described in pyproject.toml as Python supercharged for fastai development. It adds features inspired by other languages, including Ruby-style mixins and Haskell-style currying, and cleans up parts of the standard library such as parallel processing and list operations.

### How do I install fastcore?

The README gives two options: conda install fastcore -c fastai if you use Anaconda, which it recommends, or pip install fastcore. For an editable install, clone the repository and run pip install -e ".[dev]", which pulls in the dev extra defined in pyproject.toml.

### Does fastcore have any required dependencies?

No. The dependencies list in pyproject.toml is empty, so fastcore installs on its own. The heavy packages such as numpy, torch and pandas are only pulled in through the optional dev extra.

### What changed in fastcore v2?

The README states that v2 removed or relocated several APIs: Param is gone from fastcore.script, the star* and rstar* methods on L are replaced by the star and rstar adapters, spread is replaced by star, dspread is renamed to dstar, async helpers moved to fastcore.aio, Config moved to xtras, fastcore.net lost its request builders, and parallel_gen was removed. Python 3.11 or later is now required.

### Can I still use the old fastcore APIs after v2?

Yes, by pinning the older release. The README states that if you need the old APIs, pin fastcore<2. It also notes that code importing through fastcore.utils or fastcore.all is mostly unaffected by the breaking changes.

## Sources

- [Official documentation](http://fastcore.fast.ai)
- [Official README](https://github.com/AnswerDotAI/fastcore#readme)
- [Project repository](https://github.com/AnswerDotAI/fastcore)
- [Release notes](https://github.com/AnswerDotAI/fastcore/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/answerdotai-fastcore
