Skip to content

feat: configure types of integers fields when initializing Point from dict structure #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Dec 9, 2022

Closes #516

Proposed Changes

The users can specify integer types by:

# Use custom dictionary structure
dict_structure = {
    "measurement": "h2o_feet",
    "tags": {"location": "coyote_creek"},
    "fields": {
        "water_level": 1.0,
        "some_counter": 108913123234
    },
    "time": 1
}

point = Point.from_dict(dict_structure, field_types={"some_counter": "uint"})

Documentation:

image

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@bednar bednar changed the title feat: add possibility to configure types of integers fields when initializing Point from dict structure feat: configure types of integers fields when initializing Point from dict structure Dec 9, 2022
@bednar bednar marked this pull request as ready for review December 9, 2022 09:15
@bednar bednar requested a review from powersj December 9, 2022 09:15
@bednar bednar merged commit 03f5bd7 into master Dec 12, 2022
@bednar bednar deleted the integer_types branch December 12, 2022 12:39
@bednar bednar added this to the 1.35.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add uint64 support to line protocol serializer
2 participants