prism/cli.py
def create(ctx, table_name, schema_path):
    """Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH

    Example: prism create my_table /home/data/schema.json
    """

    # get the initialized prism class
    p = ctx.obj["p"]

    # read in your table schema
    schema = prism.load_schema(schema_path)

    # clean up the table name
    table_name = table_name.replace(" ", "_")

    # create an empty API table
    table = prism.create_table(p, table_name, schema["fields"])

    # print message
    click.echo(json.dumps(table, indent=2, sort_keys=True))
Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH

    Example: prism create my_table /home/data/schema.json
    
Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH
Example: prism create my_table /home/data/schema.json
Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH Example : prism create my_table / home / data / schema . json
def create(ctx, table_name, schema_path):
    p = ctx.obj["p"]
    schema = prism.load_schema(schema_path)
    table_name = table_name.replace(" ", "_")
    table = prism.create_table(p, table_name, schema["fields"])
    click.echo(json.dumps(table, indent=2, sort_keys=True))
def create ( ctx , table_name , schema_path ) : p = ctx . obj [ "p" ] schema = prism . load_schema ( schema_path ) table_name = table_name . replace ( " " , "_" ) table = prism . create_table ( p , table_name , schema [ "fields" ] ) click . echo ( json . dumps ( table , indent = 2 , sort_keys = True ) )
Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH
Example: prism create my_table /home/data/schema.json
Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH Example : prism create my_table / home / data / schema . json
"""Create a new Prism table TABLE_NAME with schema from SCHEMA_PATH

    Example: prism create my_table /home/data/schema.json
    """ # get the initialized prism class # read in your table schema # clean up the table name # create an empty API table # print message
ctx
table_name
schema_path