Skip to content

Instantly share code, notes, and snippets.

Avatar

Burak Arslan plq

View GitHub Profile
@plq
plq / null.py
Last active Aug 29, 2015
question
View null.py
from spyne.application import Application
from spyne.decorator import rpc
from spyne.service import ServiceBase
from spyne.protocol.soap import Soap11
from spyne.model.primitive import String, Integer
from spyne.model.complex import ComplexModel
class DatosFac(ComplexModel):
__namespace__ = 'facturamanager.datosfac'
numero = String(pattern=r'[A-Z]/[0-9]+')
View someservice.py
#!/usr/bin/env python
# encoding: utf8
# Requires Spyne 2.11
from spyne.model.primitive import *
from spyne.model.complex import *
from spyne.application import Application
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
View mi.py
import logging
from uuid import uuid4
from spyne.application import Application
from spyne.decorator import rpc
from spyne.protocol.json import JsonDocument
from spyne.protocol.http import HttpRpc
from spyne.service import ServiceBase
from spyne.model.primitive import String, Integer, Uuid, Unicode
from spyne.model.complex import ComplexModel
from spyne.server.wsgi import WsgiApplication
View output
<Foo>
<node_b>more_data</node_b>
<node_a ATTR="1st">data1</node_a>
<node_a ATTR="2nd">data2</node_a>
</Foo>
View output
INFO:root:Spyne 2.11.0 initialized
INFO:root:create_incident: Parameters:<ns0:IncidentParams xmlns:ns0="tns">
<ns0:number>INC0000001</ns0:number>
</ns0:IncidentParams>
.
----------------------------------------------------------------------
Ran 1 test in 0.009s
OK
View README
Schemas are from
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Fourth%20Edition,%20Part%201%20-%20Fundamentals%20And%20Markup%20Language%20Reference.zip
found as link of ECMA-376 4th edition Part 1 at:
http://www.ecma-international.org/publications/standards/Ecma-376.htm
@plq
plq / sample
Last active Aug 29, 2015 — forked from anonymous/teo.py
View sample
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
@plq
plq / FastRezBinding.xsd
Last active Aug 29, 2015
OpenTravel schema test
View FastRezBinding.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="1.00" id="OTA2010B">
<xs:annotation>
<xs:documentation xml:lang="en">All Schema files in the OpenTravel Alliance specification are made available according to the terms defined by the OpenTravel License Agreement at http://www.opentravel.org/Specifications/Default.aspx.</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in RFC 2199.</xs:documentation>
</xs:annotation>
<xs:element name="OTA_HotelAvailRQ">
<xs:annotation>
@plq
plq / test.py
Created Jun 29, 2015
relationship test
View test.py
from sqlalchemy import *
class Parent(Base):
__tablename__ = 'parent'
id = Column(Integer, primary_key=True)
child = relationship("Child", uselist=False, backref="parent")
class Child(Base):
__tablename__ = 'child'
id = Column(Integer, primary_key=True)
@plq
plq / test.py
Last active Aug 29, 2015
sqlalchemy inheritance test case
View test.py
from sqlalchemy import Column, Integer
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class C(Base):
__tablename__ = 'C'
You can’t perform that action at this time.