marshmallow-code / marshmallow-code/marshmallow

pathlib.Path support

Open
#1,815 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
738
Avg merge
1d 23h
Merged PRs (30d)
7

Description

It would be nice if there were a Marshmallow field for (de)serializing `pathlib.Path` objects since these are often more convenient to work with than raw strings and `os.path` functions. I typically use Marshmallow via [marshmallow_dataclass](https://github.com/lovasoa/marshmallow_dataclass) and can work around this with hooks but having builtin support for `Path`s would be a great addition.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing field implementations and their tests in the marshmallow repository, then review how pathlib.Path values should be represented during serialization and deserialization. Done means a built-in field supports Path values in both directions, with validation covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.