Comments (4)
Cannot reproduce this one.... Eg, I can start the project like this:
$env:CONFIG_PATH="config_test.yml"
$env:DATA_PATH="tests/data"
uvicorn bmsdna.lakeapi.standalone:app --host 0.0.0.0 --port 8081
from lakeapi.
So you always have to set the CONFIG_PATH and you are not able to control it inside the python code?
If you do that
import dataclasses
import bmsdna.lakeapi
def_cfg = bmsdna.lakeapi.get_default_config() # Get default startup config
cfg = dataclasses.replace(def_cfg, enable_sql_endpoint=True, data_path="tests/data") # Use dataclasses.replace to set the properties you want
sti = bmsdna.lakeapi.init_lakeapi(app, cfg, "config_test.yml") # Enable it. The first parameter is the FastAPI instance, the 2nd one is the basic config and the third one the config of the tables
and config.yml is not available, and no env variable is set you get the error.
from lakeapi.
that should work, too. I don't get the error:
import dataclasses
import bmsdna.lakeapi
import fastapi
app = fastapi.FastAPI()
def_cfg = bmsdna.lakeapi.get_default_config() # Get default startup config
cfg = dataclasses.replace(
def_cfg, enable_sql_endpoint=True, data_path="tests/data"
) # Use dataclasses.replace to set the properties you want
sti = bmsdna.lakeapi.init_lakeapi(
app, cfg, "config_test.yml"
)
Started with uvicorn repo:app --host 0.0.0.0 --port 8081
where my file is called repo.py
from lakeapi.
I am doing something wrong :-)
from lakeapi.
Related Issues (20)
- Drop create delta table can result in internal error HOT 2
- Option to always use duckdb storage backend
- Initializing DuckDB can lead to Error 500
- Drop support for Avro HOT 1
- Drop Datafusion HOT 1
- Remove Datafusion from LakeAPI Architecture Image
- Release Version 1.0.0
- Md5 hash with Integer is not working
- Considering in memory HOT 2
- Perf Issue. Something seems to block after multiple calls of the same endpoint with the same parameter HOT 3
- Install dependencies takes ages HOT 2
- Sort by direction desc doesn't work
- Pyright blocking release HOT 1
- Correct implementation of combi params in OpenAPI doc
- Combine Metadata tag under one tag "Metadata" to clean up OpenAPI /doc
- It can block HOT 2
- Change versioning path HOT 2
- Bump duckdb to 0.8.1 HOT 1
- Prefix trick
- Cache response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lakeapi.