Skip to content

belov38/1c-odata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1c-odata

Установка

pip install odata1cw

Пример

1C v8 OData wrapper V8.1c.ru

from odata1cw.core import Infobase
from odata1cw.postingmode import PostingMode
from datetime import datetime
from odata1cw.document import Document
from odata1cw.catalog import Catalog

connection = Infobase('http://myserver:port/','Infobase1','User','Password')

users = Catalog(connection,'Пользователи')
user.query() # get all
user.query(top=5)
user.query(top=5, skip=2)
user.query(select='Description, DeletionMark')

# Use singl quotes for strings!
f = "(Description eq 'IvanPetrov') and (DeletionMark eq false)"
user.query(odata_filter=f)

new = {'Description':'Новый пользователь','Комментарий':'hello odata'}

new_user = user.create(new)
edit_data = {'Комментарий':'hello odata edit'}
user.edit(guid=new_user['Ref_Key'], data=edit_data)

About

1C v8 OData wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages