Skip to content
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

Automatic environment from data api endpoint (if not supplied) #88

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

hemidactylus
Copy link
Collaborator

This PR enables automatic detection of the "environment" for using the Data API, inferred from the API Endpoint when the specific environment parameter is left unspecified.

This makes sense here, since - as opposed to a broader astrapy usage - no actual "admin" operations are performed, so there's no harm in having the endpoint first and creating the instances later.

This holds throughout all LC objects since the new logic takes place in the _AstraDBEnvironment.

Added a test for this logic.

Copy link

@mfortman11 mfortman11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super helpful! TY

@hemidactylus hemidactylus merged commit 8227c0b into main Oct 1, 2024
13 checks passed
@hemidactylus hemidactylus deleted the SL-auto-environment branch October 1, 2024 16:43
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.

2 participants