Git Product home page Git Product logo

pythonscripts's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pythonscripts's Issues

Add license to pythonscripts

Hi Maarten, I work for the Linux Foundation, and we would like to adapt your nexus2/cleanup.py script to be part of our lftools (https://gerrit.linuxfoundation.org/infra/#/admin/projects/releng/lftools). In order to do this, I was hoping you might be able to add an EPL-compatible license to this repo, or at least that file (Eclipse has a list of acceptable licenses here: http://www.eclipse.org/legal/licenses.php). Alternatively, if you would be interested, we'd also be happy to have your code contributed directly to lftools! Thanks for your time.

SOAP Working with

Trying to use the SOAP example with a different site and only returning the xml from the site and not the response.


import concurrent.futures
import requests
from string import Template
import time
import xml.etree.ElementTree as ET

max_workers=20
inputfile='input.txt'
outputokfile='outputok.txt'
outputerrorfile='outputerror.txt'

url = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'

messagetemplate=Template(r"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:checkVat>
         <urn:countryCode>$countryCode</urn:countryCode>
          <urn:vatNumber>$vatNumber</urn:vatNumber>
      </urn:checkVat>
   </soapenv:Body>
</soapenv:Envelope>""")

headers = {'SOAPAction': 'checkVat','Content-Type':'text/xml;charset=UTF-8'}

# Retrieve a single page and report the URL and contents
def fire_post_request(url, data,timeout):
    start_time = time.time()
    response=requests.post(url, data=data,timeout=timeout,headers=headers)
    end_time=time.time() - start_time
    return response

def write(text,filename):
    file = open(filename, 'a')
    file.write(text)
    file.close()
data = messagetemplate.substitute(countryCode='AT',vatNumber='U123456789')

x = fire_post_request(url, data,60)
print(x.text)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.