Expand Library of The Farmer Was Relpaced
Just copy all the file into your save folder to use it.
Also you can install this libray by excuting pip install TFWR-expand.
CAUTION: Remember to backup a __builtin__.py file in your save folder before using this library. This library will overwrite your __builtin__.py file. Or, you can use this libray at other folder or do not copy __builtin__.py file into your save folder.
Enjoy it!
Document
Basically, __builtin__.py, __init__.py and _tfwr_official_provided.__builtins__.py provide the Python language features to you.
They are Python scripts which can't be imported in the game.
algorithms
import algorithms.
qsort(arr)
Calling algorithms.qsort(arr) with any list will sort it.
For example:
from algorithms import qsort
arr = [3, -1, 11, 0, 7]
qsort(arr)
print(arr) # [-1, 0, 3, 7, 11]
tools
import tools.
has_item(item)
Calling tools.has_item(item) for checking whether player has Items. Returns True if the player has it, otherwise False.
cost_enough(entity, level=None, scale=1.0)
Calling tools.cost_enough(thing, level=None, scale=1.0) for checking whether player has enough item(s) to buy or plant the thing. Returns True if the player has enough item(s), otherwise False.
Release files for tfwr-expand 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tfwr_expand-0.1.1.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tfwr_expand-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / tfwr_expand-0.1.1.tar.gz
| Download URL | tfwr_expand-0.1.1.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab4a5da5832d355891d8e1ca2164b023a5e64a51e192140287f6d3c807d8e652
|
|
BLAKE2b-256 checksum How to use checksums |
0ef613b13cdf0c6dd4f1a4ed35d35fec085c6d3f47e7567cd6d1d43af37ade2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency logRelease files / tfwr_expand-0.1.1-py3-none-any.whl
| Download URL | tfwr_expand-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c95b1dd3b1c1fcf70cb8bf7e2c7ae2f72be4226e56e86b875eefc0b43cccd84b
|
|
BLAKE2b-256 checksum How to use checksums |
ea02a19f3aea2e73ee8c37913a40ef193939ef875d605423b4b01b79f1e605f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.
Transparency log