semvec/pypi-packages huggingface dataset:
netsdldv 0.0.9
a tools for ami
License: MIT
Keywords: ami dv python

# basic knowledge

- 这是什么?
```
这是一个sql 执行中间件, 它可以从配置文件中读取,并加载配置按需生成相应的sql 并执行.
```

- 怎么配置
```
以 xmlFactory 举例.
xml 的文件格式如下
	<DV>
		<ID>1</ID> #dv_id
		<TableName>order_head</TableName>  # the table you will select from 
		<TopRecord>500</TopRecord> # euqal to select top 
		<Fields> # format will be {TrueField} as {DispField}, ${number} is a placeholder number will be replace by true table name
			<Field>
				<DispField>Order_date</DispField> 
				<TrueField>dbo.Fn_DispDateTime($0.Order_date)</TrueField>
				<WhereField>$0.Order_date</WhereField>
			</Field>
                </Fields>
		<Tables>
			<Table ID="88"> # $88
				<Name>V_Type</Name> # true table name
				<Alias>Tp_order</Alias> 
				<Relation> # relations that about with this alias
                                $0.Order_type=$88.Type_no    and  $88.Type_for='Order_type'  and   $88.Pj_id=$0.Pj_id and $88.Status&gt;=0

</Relation>
				<JoinType>left</JoinType>
                        </Table>
                </Tables>
        </Dv>
```

# 1 how to use
```
        engine = create_engine(self.G2CN_str)
        session = sessionmaker(bind=engine)

        factory = XMLFactory("D:\\chenchu\\Python\\DvManager\\test.xml")
        dvm = factory.Build()

        dvm.addQueryField(['Cust_no', 'Order_type_name', 'Order_date'])
        # dvm.filter= DvFilter('Order_date').Equal_to('2019-10-11') #'Order_date'
        dvm.filter.field_name = 'Order_date'
        dvm.filter.LESS_THAN('2019-10-11')

        # add field
        dvm.fields['Pj_id'] = DvField(id="",disp_name='Pj_id',true_name="$0.Pj_id",where_name="$0.Pj_id") 

        pj_id  = DvFilter('Pj_id').Equal_to('82187')

        dvm.filter.AND(pj_id)
        dvm.top_record = 1000
        dvm.temp_tablename = "#ls"

        dvm.sql_adapter = sql_server(session()) # 或许可以设为 default
        print(dvm.Build()) 
        rows = dvm.Query()
        for row in rows:
            print(row)
```

# 2.how to load from xml

```
        factory = XMLFactory("./test.xml")
        dvm = factory.Build()
```

# 3.how to generate a xml from a dvid

```
        # self.AmimanagerDB == connection string
        tools = dv2xml.dv2xml(self.AmimanagerDB,1)
        tools.run("./test.xml")
```
ctrlv 0.0.1
Code snippet store
License: MIT
Requires Python: >=3.6

### What is ctrl-v?
**ctrl-v** is a markdown code snippet store written in Python using the Flask framework.  Store your code snippets that you always keep missing!

### Installation
Use the following command to install ctrl-v from [PyPI][1] 

    $ pip install crtlv

### Launch ctrl-v

After installing crtl-v you can launch the application from your terminal / command line. 

    $ ctrl-v
    Serving on http://localhost:5000

You can also launch ctrl-v using   ` $  ctrlv`  or  `$ python -m ctrlv`.

By default, the app runs on port  5000 on 127.0.0.1. 

You can however choose to run it on a different port or host using the `--port` and `--host` options.

    $ crtl-v  --host 0.0.0.0 --port 5500
    Serving on http://0.0.0.0:5500

### Password protection

To add a username and password to protect you site, use the `protect` command.

    $ ctrl-v protect
    Username: bitto
    Password: 
    Repeat for confirmation: 
    Your site is now protected.

To remove password protection use the `removeprotect` command.

    $ crtl-v removeprotect
    Protection is removed

### Uninstall ctrl-v

    $ pip uninstall crtlv

Notes

- In addition to the `ctrl-v` command, you can also use `ctrlv` command.
- While you can use the `ctrl-v` command to run and manage the application, you should use `ctrlv` while installing and uninstalling.

  [1]: https://pypi.org/