Skip to content

Update API key requirement for May 12, 2026 Census update and add error for users.#166

Merged
antidipyramid merged 3 commits into
datamade:masterfrom
peterrrock2:master
May 15, 2026
Merged

Update API key requirement for May 12, 2026 Census update and add error for users.#166
antidipyramid merged 3 commits into
datamade:masterfrom
peterrrock2:master

Conversation

@peterrrock2
Copy link
Copy Markdown
Contributor

@peterrrock2 peterrrock2 commented May 12, 2026

Hey! Just adding this here in case it helps. Please let me know if there is a better branch to open this PR against (I didn't see any notes on contributing that specified).

This is a quick patch to a bug flagged in #165. As of today, the US Census Bureau now requires all requests made against its API carry an API key. But when calling

census = Census(key="<API_KEY>")

the API key was not always forwarded to requests. This PR adds modifies the _field_type cache to add in the API key and adds a warning to users that the key is now required.

This also patches the fields and tables requests and adds a test to make sure that you have passed an API key to the Client.

@pedrocamargo
Copy link
Copy Markdown

This looks good. I guess @jcarbaugh would need to merge and make a new release now.

@jcarbaugh
Copy link
Copy Markdown
Contributor

@pedrocamargo DataMade fully owns the package now and are the maintainers on PyPI too

@pedrocamargo
Copy link
Copy Markdown

A job for @hancush or @derekeder , then?

@antidipyramid antidipyramid requested review from antidipyramid and removed request for antidipyramid May 15, 2026 19:11
@antidipyramid antidipyramid merged commit b919d4f into datamade:master May 15, 2026
1 of 6 checks passed
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.

4 participants