Draft-kings

Latest version: v3.1.0

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

Scan your dependencies

3.1.0

Summary

Implemented in PR 104.

Adds a `Client().game_type_rules(game_type_id=1)` method.

3.0.0

This `v3.0.0` release of the DraftKings client improves on the internals of the client while also (hopefully) providing a nicer output API for developers.

The use of [the `marshmallow` library](https://marshmallow.readthedocs.io/en/stable/)

The `marshmallow` library is used to deserialize the response from `draftkings.com` endpoints into data class objects.

These classes use [the `dataclasses` module](https://docs.python.org/3.7/library/dataclasses.html) introduced in Python `3.7`.

These data objects are then processed / transformed into data class objects exposed by the client's public API.

Outputting objects

**A breaking change from `v2.x` is that the client now returns explicit classes vs. `dict`s.**

This is done for two reasons

1. Using explicit classes makes it easier to use type hinting when reading data from the client (as well as making the developer experience better when working on changes inside the project, IMHO)
2. `marshmallow` + explicit classes makes it easy to take a class instance and serialize it into some other format (like plain old `dict`s or `JSON`)

Client `class` vs. exported functions

**Another breaking change from `v2.x` is that in `v2.x`, the API was a series of functions that could be imported from a module.**

In `v3.0.0`, the proper way of using the API is to import the `Client` from the `draft_kings` module, instantiate it, and then call the relevant methods on the instantiated `Client` instance.

2.0.3

Summary

42 updates the version of the `urllib3` library to `1.25.9` to avoid vulnerabilities associated with version `1.24.3`.

This also meant upgrading the associated `requests` library version because the previous version of `2.20.0` explicitly only allowed `urllib3` < `1.25`.

By upgrading `requests` to `2.22.0`, `urllib31.25.9` was allowed.

2.0.2

Not secure
Summary

Includes 40 (which closed 37) which is supposed to fix `TypeError`s associated with `null` start times for a player's draft metadata.

2.0.1

Not secure
Contains 35 which fixes a bug around the contest response translator.

This is a backwards-incompatible change but it was done to fix a bug with contest response being a list instead of a list of lists, hence the `patch` upgrade instead of a major version upgrade.

35 also updated documentation and examples.

This also adds a `sport` field to the contest draft group response translation.

2.0.0

Not secure
V2 of the DraftKings Client (27)

A cleaner (hopefully) implementation that also provides a cleaner interface.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.