Sans

Latest version: v1.2.6

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

1.2.6

- Added views support to `sans.serversent_events`
- Simply call the `view` method on the object returned by `sans.serversent_events`
py
for event in sans.serversent_events(
client, "move", "founding", "cte", "member", "endo"
).view(regions=["the north pacific"]):
print(event["str"])

- Added `nations=` and `regions=` parameters to `sans.serversent_events` for adding nation and region buckets.
- `sans.serversent_events(None, "endo", regions=["the north pacific"])` is equivalent to `sans.serversent_events(None, "endo", "region:the north pacific")`
- The `view` method also supports these parameters

**Full Changelog**: https://github.com/Zephyrkul/sans/compare/1.2.5...1.2.6

1.2.5

What's Changed
- `sans.serversent_events` iterators will now retry the connection if the server times out waiting for an event
- `sans.serversent_events` parameter is now referred to as "buckets" in the function signature and associated error messages, due to the old name "filters" being [misleading](https://forum.nationstates.net/viewtopic.php?p=42291060#p42291060)

**Full Changelog**: https://github.com/Zephyrkul/sans/compare/1.2.4...1.2.5

1.2.4

What's Changed
- Added `sans.serversent_events`, an (optionally async) iterator over [server-sent events](https://www.nationstates.net/pages/api.html#sse)
- Events timestamps and IDs will be parsed into datetimes and ints, respectively

1.2.4b1

- Add `sans.serversent_events` for the new [server-sent events](https://forum.nationstates.net/viewtopic.php?f=15&t=560112) endpoint

**Full Changelog**: https://github.com/Zephyrkul/sans/compare/1.2.3...1.2.4b1

1.2.3

- Add `Response.objectified`, which returns an ObjectifiedElement via [lxml.objectify](https://lxml.de/objectify.html).

**Full Changelog**: https://github.com/Zephyrkul/sans/compare/1.2.2...1.2.3

1.2.2

- Add `sans.PrivateCommandError` for when the `prepare` part of `sans.prepare_and_execute` returns an ERROR xml response (previously this would unintentionally cause a TypeError)
- Fixes a TypeError when `mode=` is passed to `sans.prepare_and_execute`
- Add a way to use private shards and commands via the CLI

**Full Changelog**: https://github.com/Zephyrkul/sans/compare/1.2.1...1.2.2

Page 1 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.