Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ With trace, we see how ``dill`` stored the lambda (``F1``) by first storing
(which is used to handle code objects), then we handle the reference to
the global dict (``D2``). A ``#`` marks when the object is actually stored.

Custom pickling

```python
import dill
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine

@dill.register(Engine)
def save_sqlalchemy_engine(pickler, obj):
pickler._byref = getattr(pickler, '_byref', False)
pickler._recurse = getattr(pickler, '_recurse', False)
pickler.save_reduce(create_engine, (obj.url,), obj=obj)
```


More Information
----------------
Expand Down