napper-sync
Sync what your nursery logs in Famly - naps, meals, diaper changes - into the Napper baby tracker, automatically. Also an unofficial Python client for the Napper API.
Auf Deutsch: Überträgt automatisch, was die Kita in Famly einträgt - Schlaf, Mahlzeiten und Windelwechsel - in die Baby-App Napper. Kein Abtippen am Abend, keine Duplikate, und nachträgliche Korrekturen der Kita werden übernommen. Läuft per Zeitplan auf einem Raspberry Pi oder jedem anderen Rechner und braucht nur die Python-Standardbibliothek. Die Dokumentation ist englisch, Fragen und Issues gern auch auf Deutsch.
Napper is a sleep-and-care tracker for babies. Famly is the app many nurseries use to tell parents what happened during the day. If your child is in a Famly nursery and you track at home with Napper, you end up typing the nursery's entries into Napper by hand every evening. This tool does that for you, every hour, without creating duplicates.
Along the way it documents two APIs that have no public documentation - see
docs/.
Disclaimer. This project is not affiliated with, endorsed by, or supported by Napper AB or Famly ApS. It talks to private, undocumented APIs that the official apps use internally. Those APIs may change or disappear with any app update, and using them may not be covered by the services' terms - check the terms that apply to your account before you decide. Use it with your own account, for your own child, at your own risk; how you use it is your responsibility.
What it does
- Napper API client - log in with the e-mailed one-time code, read the history, write and delete entries in all eleven categories Napper knows (nap, bedtime, woke up, night waking, nursing, bottle, solids, pumping, diaper, temperature, medicine), with field validation before anything is sent.
- Famly → Napper sync - reads the nursery's daily events and creates the
matching Napper entries, marked
(Famly)so you can tell them apart. When the nursery corrects an entry later, the Napper entry follows. - Safe by default - every write is a dry run unless you pass
--live; duplicate detection makes repeated runs harmless; the Napper rate limit is handled with back-off. - File import - CSV or JSON for anything else you want to get into Napper.
- Unattended operation - systemd timer, Discord notifications on failure and on successful imports, tokens refreshed automatically.
Standard library only; no runtime dependencies.
Install
pipx install napper-sync
# or
pip install --user napper-sync
Requires Python 3.11+.
Quick start
napper-sync login you@example.com # Napper e-mails a code; paste it
napper-sync babies # find your baby's ID
napper-sync config init # write ~/.config/napper-sync/config.toml
# -> put the baby ID into [napper] baby_id
napper-sync logs 2026-09-01 2026-09-07 # read a week
napper-sync add nap 2026-09-18T13:00 2026-09-18T14:20 # dry run
napper-sync add nap 2026-09-18T13:00 2026-09-18T14:20 --live # write
napper-sync add diaper 2026-09-18T15:30 --set diaperContent=WET --live
napper-sync add medicine 2026-09-18T19:00 --comment "Vitamin D" --live
napper-sync categories # every category, field and allowed value
Famly sync
napper-sync famly token <VALUE> # from localStorage["famly.accessToken"] in a logged-in browser
napper-sync famly children # -> [famly] child_id in the config
napper-sync famly calendar 2026-09-14 2026-09-18 # what the nursery logged
napper-sync sync-famly # dry run: shows what would be written
napper-sync sync-famly --live # write it
To run this hourly on a Raspberry Pi with Discord alerts, see
docs/deployment.md.
Importing a file
napper-sync sync-file entries.csv --live
Columns start,end,category,comment plus any category field as a further
column; see examples/entries.example.csv.
An optional id column pins the Napper ID, so importing a corrected file
updates the entries instead of duplicating them.
Categories accept English or German short names (nap/nickerchen,
diaper/windel, bottle/flasche, …).
How it stays safe
| Risk | Answer |
|---|---|
| Writing by accident | every write and delete is a dry run without --live |
| Duplicates from repeated runs | Famly entries get a stable ID derived from child, category and start, so a repeated run rewrites the same entry instead of adding one; anything not yet in Napper is skipped if the same category is already there within 10 minutes or overlaps, which protects against older imports and hand-made entries; day markers are one-per-day |
| Corrections at the nursery | a changed end time, note or diaper content overwrites the Napper entry on the next run; fields added by hand in the app are kept, but the comment belongs to the nursery entry and is reset if you edit it |
| Hammering the API | 429 responses are parsed and retried with the server's requested delay |
| Bad data | field names, enum values and ranges are validated locally before a request is built |
| Silent breakage | Discord message on expired token, failed write, crashed run; unknown Famly event types are listed, never dropped |
Known limits
- Two Famly entries of the same category within ten minutes, such as two meals or two diaper changes in a row, are merged into one. The second is only counted as unchanged, not listed.
- A nap that is still running at the nursery has no end yet. It is listed as skipped until it ends.
- If the nursery moves the start time of an entry, Napper sees a new event. Within ten minutes of the old entry, or overlapping it, the old entry stays as it is. Otherwise a second entry appears next to it.
- Entries deleted at the nursery are not deleted in Napper.
- A Napper token that was refreshed but could not be saved is lost, and a new login is needed. See the deployment guide.
Project layout
src/napper_sync/
napper.py Napper API client (auth, read, write, delete)
categories.py what each category expects - the data model
sync.py Entry, duplicate detection, the sync loop
sources.py CSV / JSON sources
famly.py Famly API client
famly_mapping.py Famly events -> Napper entries
notify.py Discord webhook
config.py ~/.config/napper-sync/
cli.py the napper-sync command
tools/ research scripts: analyse history, rediscover endpoints, round-trip and correction checks
examples/ config, data files, systemd units, Windows task
docs/ what is known about both APIs, and how to deploy
tests/ pytest suite against an in-process mock of the Napper API
Documentation
- docs/napper-api.md - endpoints, auth, the log object, all categories and fields, the traps (seconds in a field called minutes, percent-encoded comments, date-based IDs), and how the write path was found
- docs/famly-api.md - instances, token, the calendar endpoint and its event shapes
- docs/deployment.md - systemd timer, hardening, Discord
Development
git clone https://github.com/PW-CODING/napper-sync && cd napper-sync
pip install -e ".[dev]"
pytest
ruff check . && ruff format --check .
The tests run against an in-process HTTP mock that reproduces the real API's quirks (whole-day responses on write, 429 throttling, token refresh). Nothing touches a real account.
Tools under tools/ do talk to the real API and are meant for the day an app
update breaks something: probe_write_path.py rediscovers the write endpoint,
roundtrip_categories.py writes one entry per category far in the past,
checks it and deletes it again, analyze_categories.py summarises which
fields your own history actually uses, and probe_corrections.py checks that
a correction made later at the nursery updates the Napper entry in place.
Contributing
Issues and pull requests are welcome, in English or German. If an app update
changed something, the most useful report includes the output of
tools/roundtrip_categories.py or of napper-sync famly calendar for a day
with the new event type (with names and IDs removed).
Related projects
Community projects around the same two apps, none of which connects them:
- home-assistant-napper - read-only Napper integration for Home Assistant
- ha-napper - another Home Assistant integration for Napper
- napper-export - export a child's complete Napper history
- famly-fetch - download your child's photos from Famly
Acknowledgements
Reading the Napper API was first worked out by brittraee/napper-export and g-nogueira/home-assistant-napper; the OTP login flow and request headers here follow their findings. Writing, deleting, the category model and the Famly side were worked out for this project.
License
Metadata
Release files for napper-sync 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 | Provenance | Actions |
|---|---|---|---|---|
| napper_sync-0.1.1.tar.gz | 184.4 kB | With provenance | Details for napper_sync-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napper_sync-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for napper_sync-0.1.1-py3-none-any.whl |
Total release size: 217.7 kB
Release files / napper_sync-0.1.1.tar.gz
| Download URL | napper_sync-0.1.1.tar.gz |
|---|---|
| Size | 184.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e797bc4e07aab83f91e6342b5276cc0878d6d9b26833c19869da3827cdd6954a
|
|
BLAKE2b-256 checksum How to use checksums |
7b107879b1062bacc373074674d7670c3a976d3b30f6855f4b40fbe7acfce100
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 8, 2026.
Transparency logRelease files / napper_sync-0.1.1-py3-none-any.whl
| Download URL | napper_sync-0.1.1-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc5850a767574c0f5aeb65a72441b68659f83a7a0cc5365b8c585b677057ad38
|
|
BLAKE2b-256 checksum How to use checksums |
842b7a1d648e0a9d0cb81f5982139118c86d9131472cb55a49103cd4bce0a30a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 8, 2026.
Transparency logSecurity for napper-sync 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for napper_sync-0.1.1.tar.gz
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 Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.