├── .editorconfig
├── .github
└── workflows
│ ├── codeql-analysis.yml
│ ├── continuous_deployment.yml
│ ├── continuous_integration.yml
│ ├── dependency-review.yml
│ ├── greetings.yml
│ └── stale.yml
├── .gitignore
├── LICENSE
├── MANIFEST.in
├── Pipfile
├── Pipfile.lock
├── README.md
├── certificados
├── ejemploCer.cer
└── ejemploKey.key
├── cfdiclient
├── __init__.py
├── autenticacion.py
├── autenticacion.xml
├── descargamasiva.py
├── descargamasiva.xml
├── fiel.py
├── signer.py
├── signer.xml
├── solicitadescargaEmitidos.py
├── solicitadescargaEmitidos.xml
├── solicitadescargaRecibidos.py
├── solicitadescargaRecibidos.xml
├── utils.py
├── validacioncfdi.py
├── verificasolicituddescarga.py
├── verificasolicituddescarga.xml
└── webservicerequest.py
├── ejemplo_completo.py
├── pylint.rc
├── setup.cfg
├── setup.py
└── tests
├── __init__.py
└── test_cfdiclient.py
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | end_of_line = lf
9 | insert_final_newline = true
10 |
11 | # Matches multiple files with brace expansion notation
12 | # Set default charset
13 | [*.{js,py}]
14 | charset = utf-8
15 |
16 | # 4 space indentation
17 | [*.py]
18 | indent_style = space
19 | indent_size = 4
20 |
21 | # Tab indentation (no size specified)
22 | [Makefile]
23 | indent_style = tab
24 |
25 | # Indentation override for all JS under lib directory
26 | [**.js]
27 | indent_style = space
28 | indent_size = 2
29 |
30 | # Matches the exact files either package.json or .travis.yml
31 | [{package.json,.travis.yml}]
32 | indent_style = space
33 | indent_size = 2
34 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ master ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ master ]
20 | schedule:
21 | - cron: '17 23 * * 4'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: ubuntu-latest
27 | permissions:
28 | actions: read
29 | contents: read
30 | security-events: write
31 |
32 | strategy:
33 | fail-fast: false
34 | matrix:
35 | language: [ 'python' ]
36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support
38 |
39 | steps:
40 | - name: Checkout repository
41 | uses: actions/checkout@v3
42 |
43 | # Initializes the CodeQL tools for scanning.
44 | - name: Initialize CodeQL
45 | uses: github/codeql-action/init@v2
46 | with:
47 | languages: ${{ matrix.language }}
48 | # If you wish to specify custom queries, you can do so here or in a config file.
49 | # By default, queries listed here will override any specified in a config file.
50 | # Prefix the list here with "+" to use these queries and those in the config file.
51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
52 |
53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54 | # If this step fails, then you should remove it and run the build manually (see below)
55 | # - name: Autobuild
56 | # uses: github/codeql-action/autobuild@v2
57 |
58 | # ℹ️ Command-line programs to run using the OS shell.
59 | # 📚 https://git.io/JvXDl
60 |
61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62 | # and modify them (or add more) to build your code if your project
63 | # uses a compiled language
64 |
65 | #- run: |
66 | # make bootstrap
67 | # make release
68 |
69 | - name: Perform CodeQL Analysis
70 | uses: github/codeql-action/analyze@v2
71 |
--------------------------------------------------------------------------------
/.github/workflows/continuous_deployment.yml:
--------------------------------------------------------------------------------
1 | name: Continuous Deployment
2 |
3 | on:
4 | push:
5 | # Sequence of patterns matched against refs/tags
6 | tags:
7 | - v[0-9]+.[0-9]+.* # add .* to allow dev releases
8 | permissions:
9 | id-token: write
10 | packages: write
11 | contents: write
12 | jobs:
13 | deploy:
14 | name: pipenv PyPI Upload
15 | runs-on: ubuntu-latest
16 | env:
17 | CI: "1"
18 |
19 | steps:
20 | - name: Checkout code
21 | uses: actions/checkout@v2
22 |
23 | - name: Create Release
24 | id: create_release
25 | uses: actions/create-release@v1
26 | env:
27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 | with:
29 | tag_name: ${{ github.ref }}
30 | release_name: Release ${{ github.ref }}
31 | draft: false
32 | prerelease: false
33 |
34 | - name: Set up Python 3.9
35 | uses: actions/setup-python@v5
36 | with:
37 | python-version: 3.9
38 |
39 | - name: Install dependencies
40 | run: |
41 | python -m pip install --upgrade --upgrade-strategy=eager pip pipenv
42 | python -m pip install .
43 | python -m pipenv install --dev
44 | env:
45 | PIPENV_DEFAULT_PYTHON_VERSION: "3.9"
46 |
47 | - name: Build wheels
48 | run: |
49 | python -m pipenv run python setup.py sdist bdist_wheel
50 | # to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
51 | - name: Publish a Python distribution to PyPI
52 | uses: pypa/gh-action-pypi-publish@release/v1
53 | with:
54 | packages-dir: dist/
55 |
56 | - name: Push changes
57 | uses: ad-m/github-push-action@master
58 | with:
59 | github_token: ${{ secrets.GITHUB_TOKEN }}
60 |
--------------------------------------------------------------------------------
/.github/workflows/continuous_integration.yml:
--------------------------------------------------------------------------------
1 | name: Continuous Integration
2 | on:
3 | push:
4 | branches:
5 | - master
6 | paths-ignore:
7 | - "docs/**"
8 | - "*.ini"
9 | - "*.md"
10 | - "**/*.txt"
11 | - ".gitignore"
12 | - ".gitmodules"
13 | - ".gitattributes"
14 | - ".editorconfig"
15 | pull_request:
16 | branches:
17 | - master
18 | paths-ignore:
19 | - "docs/**"
20 | - "*.ini"
21 | - "*.md"
22 | - "**/*.txt"
23 | - ".gitignore"
24 | - ".gitmodules"
25 | - ".gitattributes"
26 | - ".editorconfig"
27 | jobs:
28 | build:
29 | name: ${{matrix.os}} / ${{ matrix.python-version }}
30 | runs-on: ${{ matrix.os }}-latest
31 | strategy:
32 | fail-fast: false
33 | matrix:
34 | # python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
35 | # os: [MacOS, Ubuntu, Windows]
36 | # architecture: [x64, x86]
37 | python-version: [3.7, 3.8, 3.9]
38 | os: [MacOS, Ubuntu, Windows]
39 | architecture: [x64]
40 | steps:
41 | - uses: actions/checkout@v1
42 |
43 | - name: Set up Python ${{ matrix.python-version }}
44 | uses: actions/setup-python@v5
45 | with:
46 | python-version: ${{ matrix.python-version }}
47 | architecture: ${{ matrix.architecture }}
48 |
49 | - name: Get python path
50 | id: python-path
51 | run: |
52 | echo ::set-output name=path::$(python -c "import sys; print(sys.executable)")
53 |
54 | - name: Install latest pip
55 | run: |
56 | python -m pip install --upgrade pip pipenv --upgrade-strategy=eager
57 |
58 | - name: Install
59 | env:
60 | PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
61 | PYTHONWARNINGS: ignore:DEPRECATION
62 | PYTHONIOENCODING: "utf-8"
63 | GIT_ASK_YESNO: "false"
64 | run: |
65 | git submodule sync
66 | git submodule update --init --recursive
67 | python -m pip install -e . --upgrade
68 | pipenv install --deploy --dev --python=${{ steps.python-path.outputs.path }}
69 |
70 | - name: Run tests
71 | env:
72 | PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
73 | PYTHONWARNINGS: ignore:DEPRECATION
74 | PIPENV_NOSPIN: "1"
75 | CI: "1"
76 | GIT_ASK_YESNO: "false"
77 | PYPI_VENDOR_DIR: "./tests/pypi/"
78 | PYTHONIOENCODING: "utf-8"
79 | GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=accept-new -o CheckHostIP=no
80 | run: |
81 | pipenv run pytest
82 |
--------------------------------------------------------------------------------
/.github/workflows/dependency-review.yml:
--------------------------------------------------------------------------------
1 | # Dependency Review Action
2 | #
3 | # This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4 | #
5 | # Source repository: https://github.com/actions/dependency-review-action
6 | # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7 | name: 'Dependency Review'
8 | on: [pull_request]
9 |
10 | permissions:
11 | contents: read
12 |
13 | jobs:
14 | dependency-review:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - name: 'Checkout Repository'
18 | uses: actions/checkout@v3
19 | - name: 'Dependency Review'
20 | uses: actions/dependency-review-action@v1
21 |
--------------------------------------------------------------------------------
/.github/workflows/greetings.yml:
--------------------------------------------------------------------------------
1 | name: Greetings
2 |
3 | on: [pull_request, issues]
4 |
5 | jobs:
6 | greeting:
7 | runs-on: ubuntu-latest
8 | permissions:
9 | issues: write
10 | pull-requests: write
11 | steps:
12 | - uses: actions/first-interaction@v1
13 | with:
14 | repo-token: ${{ secrets.GITHUB_TOKEN }}
15 | issue-message: 'Bienvenido nuestro proyecto python-cfdiclient'
16 | pr-message: 'Gracias por colaborar en python-cfdiclient'
17 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2 | #
3 | # You can adjust the behavior by modifying this file.
4 | # For more information, see:
5 | # https://github.com/actions/stale
6 | name: Mark stale issues and pull requests
7 |
8 | on:
9 | schedule:
10 | - cron: '17 1 * * *'
11 |
12 | jobs:
13 | stale:
14 |
15 | runs-on: ubuntu-latest
16 | permissions:
17 | issues: write
18 | pull-requests: write
19 |
20 | steps:
21 | - uses: actions/stale@v5
22 | with:
23 | repo-token: ${{ secrets.GITHUB_TOKEN }}
24 | stale-issue-message: 'Automatización cerrado no hay actividad'
25 | stale-pr-message: 'Automatización cerrado no hay actividad'
26 | stale-issue-label: 'no-issue-activity'
27 | stale-pr-label: 'no-pr-activity'
28 | ,
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/macos,python,windows,visualstudiocode
3 | # Edit at https://www.gitignore.io/?templates=macos,python,windows,visualstudiocode
4 |
5 | ### macOS ###
6 | # General
7 | .DS_Store
8 | .AppleDouble
9 | .LSOverride
10 |
11 | # Icon must end with two \r
12 | Icon
13 |
14 | # Thumbnails
15 | ._*
16 |
17 | # Files that might appear in the root of a volume
18 | .DocumentRevisions-V100
19 | .fseventsd
20 | .Spotlight-V100
21 | .TemporaryItems
22 | .Trashes
23 | .VolumeIcon.icns
24 | .com.apple.timemachine.donotpresent
25 |
26 | # Directories potentially created on remote AFP share
27 | .AppleDB
28 | .AppleDesktop
29 | Network Trash Folder
30 | Temporary Items
31 | .apdisk
32 |
33 | ### Python ###
34 | # Byte-compiled / optimized / DLL files
35 | __pycache__/
36 | *.py[cod]
37 | *$py.class
38 |
39 | # C extensions
40 | *.so
41 |
42 | # Distribution / packaging
43 | .Python
44 | build/
45 | develop-eggs/
46 | dist/
47 | downloads/
48 | eggs/
49 | .eggs/
50 | lib/
51 | lib64/
52 | parts/
53 | sdist/
54 | var/
55 | wheels/
56 | share/python-wheels/
57 | *.egg-info/
58 | .installed.cfg
59 | *.egg
60 | MANIFEST
61 |
62 | # PyInstaller
63 | # Usually these files are written by a python script from a template
64 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
65 | *.manifest
66 | *.spec
67 |
68 | # Installer logs
69 | pip-log.txt
70 | pip-delete-this-directory.txt
71 |
72 | # Unit test / coverage reports
73 | htmlcov/
74 | .tox/
75 | .nox/
76 | .coverage
77 | .coverage.*
78 | .cache
79 | nosetests.xml
80 | coverage.xml
81 | *.cover
82 | .hypothesis/
83 | .pytest_cache/
84 |
85 | # Translations
86 | *.mo
87 | *.pot
88 |
89 | # Django stuff:
90 | *.log
91 | local_settings.py
92 | db.sqlite3
93 |
94 | # Flask stuff:
95 | instance/
96 | .webassets-cache
97 |
98 | # Scrapy stuff:
99 | .scrapy
100 |
101 | # Sphinx documentation
102 | docs/_build/
103 |
104 | # PyBuilder
105 | target/
106 |
107 | # Jupyter Notebook
108 | .ipynb_checkpoints
109 |
110 | # IPython
111 | profile_default/
112 | ipython_config.py
113 |
114 | # pyenv
115 | .python-version
116 |
117 | # celery beat schedule file
118 | celerybeat-schedule
119 |
120 | # SageMath parsed files
121 | *.sage.py
122 |
123 | # Environments
124 | .env
125 | .venv
126 | env/
127 | venv/
128 | ENV/
129 | env.bak/
130 | venv.bak/
131 |
132 | # Spyder project settings
133 | .spyderproject
134 | .spyproject
135 |
136 | # Rope project settings
137 | .ropeproject
138 |
139 | # mkdocs documentation
140 | /site
141 |
142 | # mypy
143 | .mypy_cache/
144 | .dmypy.json
145 | dmypy.json
146 |
147 | # Pyre type checker
148 | .pyre/
149 |
150 | ### Python Patch ###
151 | .venv/
152 |
153 | ### VisualStudioCode ###
154 | .vscode/*
155 |
156 | ### VisualStudioCode Patch ###
157 | # Ignore all local history of files
158 | .history
159 |
160 | ### Windows ###
161 | # Windows thumbnail cache files
162 | Thumbs.db
163 | ehthumbs.db
164 | ehthumbs_vista.db
165 |
166 | # Dump file
167 | *.stackdump
168 |
169 | # Folder config file
170 | [Dd]esktop.ini
171 |
172 | # Recycle Bin used on file shares
173 | $RECYCLE.BIN/
174 |
175 | # Windows Installer files
176 | *.cab
177 | *.msi
178 | *.msix
179 | *.msm
180 | *.msp
181 |
182 | # Windows shortcuts
183 | *.lnk
184 |
185 | # End of https://www.gitignore.io/api/macos,python,windows,visualstudiocode
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include cfdiclient/*.xml
2 |
--------------------------------------------------------------------------------
/Pipfile:
--------------------------------------------------------------------------------
1 | [[source]]
2 | url = "https://pypi.org/simple"
3 | verify_ssl = true
4 | name = "pypi"
5 |
6 | [packages]
7 | lxml = ">=4.2.5"
8 | requests = ">=2.21.0"
9 | pycryptodome = ">=3.7.2"
10 | pyOpenSSL = ">=18.0.0"
11 |
12 | [dev-packages]
13 | importlib-metadata = ">=2.1.1"
14 | atomicwrites = "*"
15 | typing-extensions = "*"
16 | pytest = ">=4.6.11"
17 | autopep8 = "*"
18 | setuptools = "==68"
19 | wheel = "*"
20 | twine = "*"
21 |
--------------------------------------------------------------------------------
/Pipfile.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_meta": {
3 | "hash": {
4 | "sha256": "a9501c1ced4b7d5d91657f22fa4270d3933a57c12670efe163412249dd736d37"
5 | },
6 | "pipfile-spec": 6,
7 | "requires": {},
8 | "sources": [
9 | {
10 | "name": "pypi",
11 | "url": "https://pypi.org/simple",
12 | "verify_ssl": true
13 | }
14 | ]
15 | },
16 | "default": {
17 | "certifi": {
18 | "hashes": [
19 | "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6",
20 | "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"
21 | ],
22 | "markers": "python_version >= '3.6'",
23 | "version": "==2025.4.26"
24 | },
25 | "cffi": {
26 | "hashes": [
27 | "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d",
28 | "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771",
29 | "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872",
30 | "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c",
31 | "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc",
32 | "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762",
33 | "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202",
34 | "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5",
35 | "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548",
36 | "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a",
37 | "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f",
38 | "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20",
39 | "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218",
40 | "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c",
41 | "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e",
42 | "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56",
43 | "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224",
44 | "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a",
45 | "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2",
46 | "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a",
47 | "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819",
48 | "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346",
49 | "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b",
50 | "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e",
51 | "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534",
52 | "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb",
53 | "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0",
54 | "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156",
55 | "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd",
56 | "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87",
57 | "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc",
58 | "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195",
59 | "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33",
60 | "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f",
61 | "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d",
62 | "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd",
63 | "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728",
64 | "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7",
65 | "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca",
66 | "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99",
67 | "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf",
68 | "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e",
69 | "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c",
70 | "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5",
71 | "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69"
72 | ],
73 | "version": "==1.14.6"
74 | },
75 | "cryptography": {
76 | "hashes": [
77 | "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d",
78 | "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959",
79 | "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6",
80 | "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873",
81 | "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2",
82 | "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713",
83 | "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1",
84 | "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177",
85 | "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250",
86 | "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca",
87 | "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d",
88 | "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"
89 | ],
90 | "markers": "python_version >= '3.6'",
91 | "version": "==3.4.7"
92 | },
93 | "idna": {
94 | "hashes": [
95 | "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6",
96 | "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"
97 | ],
98 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
99 | "version": "==2.10"
100 | },
101 | "lxml": {
102 | "hashes": [
103 | "sha256:079f3ae844f38982d156efce585bc540c16a926d4436712cf4baee0cce487a3d",
104 | "sha256:0fbcf5565ac01dff87cbfc0ff323515c823081c5777a9fc7703ff58388c258c3",
105 | "sha256:122fba10466c7bd4178b07dba427aa516286b846b2cbd6f6169141917283aae2",
106 | "sha256:1b38116b6e628118dea5b2186ee6820ab138dbb1e24a13e478490c7db2f326ae",
107 | "sha256:1b7584d421d254ab86d4f0b13ec662a9014397678a7c4265a02a6d7c2b18a75f",
108 | "sha256:26e761ab5b07adf5f555ee82fb4bfc35bf93750499c6c7614bd64d12aaa67927",
109 | "sha256:289e9ca1a9287f08daaf796d96e06cb2bc2958891d7911ac7cae1c5f9e1e0ee3",
110 | "sha256:2a9d50e69aac3ebee695424f7dbd7b8c6d6eb7de2a2eb6b0f6c7db6aa41e02b7",
111 | "sha256:3082c518be8e97324390614dacd041bb1358c882d77108ca1957ba47738d9d59",
112 | "sha256:33bb934a044cf32157c12bfcfbb6649807da20aa92c062ef51903415c704704f",
113 | "sha256:3439c71103ef0e904ea0a1901611863e51f50b5cd5e8654a151740fde5e1cade",
114 | "sha256:36108c73739985979bf302006527cf8a20515ce444ba916281d1c43938b8bb96",
115 | "sha256:39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468",
116 | "sha256:4289728b5e2000a4ad4ab8da6e1db2e093c63c08bdc0414799ee776a3f78da4b",
117 | "sha256:4bff24dfeea62f2e56f5bab929b4428ae6caba2d1eea0c2d6eb618e30a71e6d4",
118 | "sha256:4c61b3a0db43a1607d6264166b230438f85bfed02e8cff20c22e564d0faff354",
119 | "sha256:542d454665a3e277f76954418124d67516c5f88e51a900365ed54a9806122b83",
120 | "sha256:5a0a14e264069c03e46f926be0d8919f4105c1623d620e7ec0e612a2e9bf1c04",
121 | "sha256:5c8c163396cc0df3fd151b927e74f6e4acd67160d6c33304e805b84293351d16",
122 | "sha256:66e575c62792c3f9ca47cb8b6fab9e35bab91360c783d1606f758761810c9791",
123 | "sha256:6f12e1427285008fd32a6025e38e977d44d6382cf28e7201ed10d6c1698d2a9a",
124 | "sha256:74f7d8d439b18fa4c385f3f5dfd11144bb87c1da034a466c5b5577d23a1d9b51",
125 | "sha256:7610b8c31688f0b1be0ef882889817939490a36d0ee880ea562a4e1399c447a1",
126 | "sha256:76fa7b1362d19f8fbd3e75fe2fb7c79359b0af8747e6f7141c338f0bee2f871a",
127 | "sha256:7728e05c35412ba36d3e9795ae8995e3c86958179c9770e65558ec3fdfd3724f",
128 | "sha256:8157dadbb09a34a6bd95a50690595e1fa0af1a99445e2744110e3dca7831c4ee",
129 | "sha256:820628b7b3135403540202e60551e741f9b6d3304371712521be939470b454ec",
130 | "sha256:884ab9b29feaca361f7f88d811b1eea9bfca36cf3da27768d28ad45c3ee6f969",
131 | "sha256:89b8b22a5ff72d89d48d0e62abb14340d9e99fd637d046c27b8b257a01ffbe28",
132 | "sha256:92e821e43ad382332eade6812e298dc9701c75fe289f2a2d39c7960b43d1e92a",
133 | "sha256:b007cbb845b28db4fb8b6a5cdcbf65bacb16a8bd328b53cbc0698688a68e1caa",
134 | "sha256:bc4313cbeb0e7a416a488d72f9680fffffc645f8a838bd2193809881c67dd106",
135 | "sha256:bccbfc27563652de7dc9bdc595cb25e90b59c5f8e23e806ed0fd623755b6565d",
136 | "sha256:c47ff7e0a36d4efac9fd692cfa33fbd0636674c102e9e8d9b26e1b93a94e7617",
137 | "sha256:c4f05c5a7c49d2fb70223d0d5bcfbe474cf928310ac9fa6a7c6dddc831d0b1d4",
138 | "sha256:cdaf11d2bd275bf391b5308f86731e5194a21af45fbaaaf1d9e8147b9160ea92",
139 | "sha256:ce256aaa50f6cc9a649c51be3cd4ff142d67295bfc4f490c9134d0f9f6d58ef0",
140 | "sha256:d2e35d7bf1c1ac8c538f88d26b396e73dd81440d59c1ef8522e1ea77b345ede4",
141 | "sha256:d916d31fd85b2f78c76400d625076d9124de3e4bda8b016d25a050cc7d603f24",
142 | "sha256:df7c53783a46febb0e70f6b05df2ba104610f2fb0d27023409734a3ecbb78fb2",
143 | "sha256:e1cbd3f19a61e27e011e02f9600837b921ac661f0c40560eefb366e4e4fb275e",
144 | "sha256:efac139c3f0bf4f0939f9375af4b02c5ad83a622de52d6dfa8e438e8e01d0eb0",
145 | "sha256:efd7a09678fd8b53117f6bae4fa3825e0a22b03ef0a932e070c0bdbb3a35e654",
146 | "sha256:f2380a6376dfa090227b663f9678150ef27543483055cc327555fb592c5967e2",
147 | "sha256:f8380c03e45cf09f8557bdaa41e1fa7c81f3ae22828e1db470ab2a6c96d8bc23",
148 | "sha256:f90ba11136bfdd25cae3951af8da2e95121c9b9b93727b1b896e3fa105b2f586"
149 | ],
150 | "index": "pypi",
151 | "version": "==4.6.3"
152 | },
153 | "pycparser": {
154 | "hashes": [
155 | "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0",
156 | "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"
157 | ],
158 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
159 | "version": "==2.20"
160 | },
161 | "pycryptodome": {
162 | "hashes": [
163 | "sha256:09c1555a3fa450e7eaca41ea11cd00afe7c91fef52353488e65663777d8524e0",
164 | "sha256:12222a5edc9ca4a29de15fbd5339099c4c26c56e13c2ceddf0b920794f26165d",
165 | "sha256:1723ebee5561628ce96748501cdaa7afaa67329d753933296321f0be55358dce",
166 | "sha256:1c5e1ca507de2ad93474be5cfe2bfa76b7cf039a1a32fc196f40935944871a06",
167 | "sha256:2603c98ae04aac675fefcf71a6c87dc4bb74a75e9071ae3923bbc91a59f08d35",
168 | "sha256:2dea65df54349cdfa43d6b2e8edb83f5f8d6861e5cf7b1fbc3e34c5694c85e27",
169 | "sha256:31c1df17b3dc5f39600a4057d7db53ac372f492c955b9b75dd439f5d8b460129",
170 | "sha256:38661348ecb71476037f1e1f553159b80d256c00f6c0b00502acac891f7116d9",
171 | "sha256:3e2e3a06580c5f190df843cdb90ea28d61099cf4924334d5297a995de68e4673",
172 | "sha256:3f840c49d38986f6e17dbc0673d37947c88bc9d2d9dba1c01b979b36f8447db1",
173 | "sha256:501ab36aae360e31d0ec370cf5ce8ace6cb4112060d099b993bc02b36ac83fb6",
174 | "sha256:60386d1d4cfaad299803b45a5bc2089696eaf6cdd56f9fc17479a6f89595cfc8",
175 | "sha256:6260e24d41149268122dd39d4ebd5941e9d107f49463f7e071fd397e29923b0c",
176 | "sha256:6bbf7fee7b7948b29d7e71fcacf48bac0c57fb41332007061a933f2d996f9713",
177 | "sha256:6d2df5223b12437e644ce0a3be7809471ffa71de44ccd28b02180401982594a6",
178 | "sha256:758949ca62690b1540dfb24ad773c6da9cd0e425189e83e39c038bbd52b8e438",
179 | "sha256:77997519d8eb8a4adcd9a47b9cec18f9b323e296986528186c0e9a7a15d6a07e",
180 | "sha256:7fd519b89585abf57bf47d90166903ec7b43af4fe23c92273ea09e6336af5c07",
181 | "sha256:98213ac2b18dc1969a47bc65a79a8fca02a414249d0c8635abb081c7f38c91b6",
182 | "sha256:99b2f3fc51d308286071d0953f92055504a6ffe829a832a9fc7a04318a7683dd",
183 | "sha256:9b6f711b25e01931f1c61ce0115245a23cdc8b80bf8539ac0363bdcf27d649b6",
184 | "sha256:a3105a0eb63eacf98c2ecb0eb4aa03f77f40fbac2bdde22020bb8a536b226bb8",
185 | "sha256:a8eb8b6ea09ec1c2535bf39914377bc8abcab2c7d30fa9225eb4fe412024e427",
186 | "sha256:a92d5c414e8ee1249e850789052608f582416e82422502dc0ac8c577808a9067",
187 | "sha256:d3d6958d53ad307df5e8469cc44474a75393a434addf20ecd451f38a72fe29b8",
188 | "sha256:e0a4d5933a88a2c98bbe19c0c722f5483dc628d7a38338ac2cb64a7dbd34064b",
189 | "sha256:e3bf558c6aeb49afa9f0c06cee7fb5947ee5a1ff3bd794b653d39926b49077fa",
190 | "sha256:e61e363d9a5d7916f3a4ce984a929514c0df3daf3b1b2eb5e6edbb131ee771cf",
191 | "sha256:f977cdf725b20f6b8229b0c87acb98c7717e742ef9f46b113985303ae12a99da",
192 | "sha256:fc7489a50323a0df02378bc2fff86eb69d94cc5639914346c736be981c6a02e7"
193 | ],
194 | "index": "pypi",
195 | "version": "==3.10.1"
196 | },
197 | "pyopenssl": {
198 | "hashes": [
199 | "sha256:4c231c759543ba02560fcd2480c48dcec4dae34c9da7d3747c508227e0624b51",
200 | "sha256:818ae18e06922c066f777a33f1fca45786d85edfe71cd043de6379337a7f274b"
201 | ],
202 | "index": "pypi",
203 | "version": "==20.0.1"
204 | },
205 | "requests": {
206 | "hashes": [
207 | "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804",
208 | "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"
209 | ],
210 | "index": "pypi",
211 | "version": "==2.25.1"
212 | },
213 | "urllib3": {
214 | "hashes": [
215 | "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4",
216 | "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"
217 | ],
218 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
219 | "version": "==1.26.6"
220 | }
221 | },
222 | "develop": {
223 | "atomicwrites": {
224 | "hashes": [
225 | "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197",
226 | "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"
227 | ],
228 | "index": "pypi",
229 | "version": "==1.4.0"
230 | },
231 | "autopep8": {
232 | "hashes": [
233 | "sha256:276ced7e9e3cb22e5d7c14748384a5cf5d9002257c0ed50c0e075b68011bb6d0",
234 | "sha256:aa213493c30dcdac99537249ee65b24af0b2c29f2e83cd8b3f68760441ed0db9"
235 | ],
236 | "index": "pypi",
237 | "version": "==1.5.7"
238 | },
239 | "backports.tarfile": {
240 | "hashes": [
241 | "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34",
242 | "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"
243 | ],
244 | "markers": "python_version >= '3.8'",
245 | "version": "==1.2.0"
246 | },
247 | "certifi": {
248 | "hashes": [
249 | "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6",
250 | "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"
251 | ],
252 | "markers": "python_version >= '3.6'",
253 | "version": "==2025.4.26"
254 | },
255 | "charset-normalizer": {
256 | "hashes": [
257 | "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4",
258 | "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45",
259 | "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7",
260 | "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0",
261 | "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7",
262 | "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d",
263 | "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d",
264 | "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0",
265 | "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184",
266 | "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db",
267 | "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b",
268 | "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64",
269 | "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b",
270 | "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8",
271 | "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff",
272 | "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344",
273 | "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58",
274 | "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e",
275 | "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471",
276 | "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148",
277 | "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a",
278 | "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836",
279 | "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e",
280 | "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63",
281 | "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c",
282 | "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1",
283 | "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01",
284 | "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366",
285 | "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58",
286 | "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5",
287 | "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c",
288 | "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2",
289 | "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a",
290 | "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597",
291 | "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b",
292 | "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5",
293 | "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb",
294 | "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f",
295 | "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0",
296 | "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941",
297 | "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0",
298 | "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86",
299 | "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7",
300 | "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7",
301 | "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455",
302 | "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6",
303 | "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4",
304 | "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0",
305 | "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3",
306 | "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1",
307 | "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6",
308 | "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981",
309 | "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c",
310 | "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980",
311 | "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645",
312 | "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7",
313 | "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12",
314 | "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa",
315 | "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd",
316 | "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef",
317 | "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f",
318 | "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2",
319 | "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d",
320 | "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5",
321 | "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02",
322 | "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3",
323 | "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd",
324 | "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e",
325 | "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214",
326 | "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd",
327 | "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a",
328 | "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c",
329 | "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681",
330 | "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba",
331 | "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f",
332 | "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a",
333 | "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28",
334 | "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691",
335 | "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82",
336 | "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a",
337 | "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027",
338 | "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7",
339 | "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518",
340 | "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf",
341 | "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b",
342 | "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9",
343 | "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544",
344 | "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da",
345 | "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509",
346 | "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f",
347 | "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a",
348 | "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"
349 | ],
350 | "markers": "python_version >= '3.7'",
351 | "version": "==3.4.2"
352 | },
353 | "docutils": {
354 | "hashes": [
355 | "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f",
356 | "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"
357 | ],
358 | "markers": "python_version >= '3.9'",
359 | "version": "==0.21.2"
360 | },
361 | "id": {
362 | "hashes": [
363 | "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d",
364 | "sha256:f1434e1cef91f2cbb8a4ec64663d5a23b9ed43ef44c4c957d02583d61714c658"
365 | ],
366 | "markers": "python_version >= '3.8'",
367 | "version": "==1.5.0"
368 | },
369 | "idna": {
370 | "hashes": [
371 | "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9",
372 | "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"
373 | ],
374 | "markers": "python_version >= '3.6'",
375 | "version": "==3.10"
376 | },
377 | "importlib-metadata": {
378 | "hashes": [
379 | "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000",
380 | "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"
381 | ],
382 | "index": "pypi",
383 | "markers": "python_version >= '3.9'",
384 | "version": "==8.7.0"
385 | },
386 | "iniconfig": {
387 | "hashes": [
388 | "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3",
389 | "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"
390 | ],
391 | "version": "==1.1.1"
392 | },
393 | "jaraco.classes": {
394 | "hashes": [
395 | "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd",
396 | "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"
397 | ],
398 | "markers": "python_version >= '3.8'",
399 | "version": "==3.4.0"
400 | },
401 | "jaraco.context": {
402 | "hashes": [
403 | "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3",
404 | "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4"
405 | ],
406 | "markers": "python_version >= '3.8'",
407 | "version": "==6.0.1"
408 | },
409 | "jaraco.functools": {
410 | "hashes": [
411 | "sha256:70f7e0e2ae076498e212562325e805204fc092d7b4c17e0e86c959e249701a9d",
412 | "sha256:ad159f13428bc4acbf5541ad6dec511f91573b90fba04df61dafa2a1231cf649"
413 | ],
414 | "markers": "python_version >= '3.8'",
415 | "version": "==4.1.0"
416 | },
417 | "keyring": {
418 | "hashes": [
419 | "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66",
420 | "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd"
421 | ],
422 | "markers": "python_version >= '3.9'",
423 | "version": "==25.6.0"
424 | },
425 | "markdown-it-py": {
426 | "hashes": [
427 | "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1",
428 | "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"
429 | ],
430 | "markers": "python_version >= '3.8'",
431 | "version": "==3.0.0"
432 | },
433 | "mdurl": {
434 | "hashes": [
435 | "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8",
436 | "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
437 | ],
438 | "markers": "python_version >= '3.7'",
439 | "version": "==0.1.2"
440 | },
441 | "more-itertools": {
442 | "hashes": [
443 | "sha256:9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3",
444 | "sha256:d43980384673cb07d2f7d2d918c616b30c659c089ee23953f601d6609c67510e"
445 | ],
446 | "markers": "python_version >= '3.9'",
447 | "version": "==10.7.0"
448 | },
449 | "nh3": {
450 | "hashes": [
451 | "sha256:087ffadfdcd497658c3adc797258ce0f06be8a537786a7217649fc1c0c60c293",
452 | "sha256:20979783526641c81d2f5bfa6ca5ccca3d1e4472474b162c6256745fbfe31cd1",
453 | "sha256:2a5174551f95f2836f2ad6a8074560f261cf9740a48437d6151fd2d4d7d617ab",
454 | "sha256:31eedcd7d08b0eae28ba47f43fd33a653b4cdb271d64f1aeda47001618348fde",
455 | "sha256:4990e7ee6a55490dbf00d61a6f476c9a3258e31e711e13713b2ea7d6616f670e",
456 | "sha256:55823c5ea1f6b267a4fad5de39bc0524d49a47783e1fe094bcf9c537a37df251",
457 | "sha256:6141caabe00bbddc869665b35fc56a478eb774a8c1dfd6fba9fe1dfdf29e6efa",
458 | "sha256:637d4a10c834e1b7d9548592c7aad760611415fcd5bd346f77fd8a064309ae6d",
459 | "sha256:63ca02ac6f27fc80f9894409eb61de2cb20ef0a23740c7e29f9ec827139fa578",
460 | "sha256:6ae319f17cd8960d0612f0f0ddff5a90700fa71926ca800e9028e7851ce44a6f",
461 | "sha256:6c9c30b8b0d291a7c5ab0967ab200598ba33208f754f2f4920e9343bdd88f79a",
462 | "sha256:713d16686596e556b65e7f8c58328c2df63f1a7abe1277d87625dcbbc012ef82",
463 | "sha256:818f2b6df3763e058efa9e69677b5a92f9bc0acff3295af5ed013da544250d5b",
464 | "sha256:9d67709bc0d7d1f5797b21db26e7a8b3d15d21c9c5f58ccfe48b5328483b685b",
465 | "sha256:a5f77e62aed5c4acad635239ac1290404c7e940c81abe561fd2af011ff59f585",
466 | "sha256:a772dec5b7b7325780922dd904709f0f5f3a79fbf756de5291c01370f6df0967",
467 | "sha256:a7ea28cd49293749d67e4fcf326c554c83ec912cd09cd94aa7ec3ab1921c8283",
468 | "sha256:ac7006c3abd097790e611fe4646ecb19a8d7f2184b882f6093293b8d9b887431",
469 | "sha256:b3b5c58161e08549904ac4abd450dacd94ff648916f7c376ae4b2c0652b98ff9",
470 | "sha256:b8d55ea1fc7ae3633d758a92aafa3505cd3cc5a6e40470c9164d54dff6f96d42",
471 | "sha256:bb0014948f04d7976aabae43fcd4cb7f551f9f8ce785a4c9ef66e6c2590f8629",
472 | "sha256:d002b648592bf3033adfd875a48f09b8ecc000abd7f6a8769ed86b6ccc70c759",
473 | "sha256:d426d7be1a2f3d896950fe263332ed1662f6c78525b4520c8e9861f8d7f0d243",
474 | "sha256:fcff321bd60c6c5c9cb4ddf2554e22772bb41ebd93ad88171bbbb6f271255286"
475 | ],
476 | "markers": "python_version >= '3.8'",
477 | "version": "==0.2.21"
478 | },
479 | "packaging": {
480 | "hashes": [
481 | "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484",
482 | "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"
483 | ],
484 | "markers": "python_version >= '3.8'",
485 | "version": "==25.0"
486 | },
487 | "pluggy": {
488 | "hashes": [
489 | "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
490 | "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
491 | ],
492 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
493 | "version": "==0.13.1"
494 | },
495 | "pycodestyle": {
496 | "hashes": [
497 | "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068",
498 | "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"
499 | ],
500 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
501 | "version": "==2.7.0"
502 | },
503 | "pygments": {
504 | "hashes": [
505 | "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f",
506 | "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"
507 | ],
508 | "markers": "python_version >= '3.8'",
509 | "version": "==2.19.1"
510 | },
511 | "pytest": {
512 | "hashes": [
513 | "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b",
514 | "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"
515 | ],
516 | "index": "pypi",
517 | "version": "==6.2.4"
518 | },
519 | "readme-renderer": {
520 | "hashes": [
521 | "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151",
522 | "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1"
523 | ],
524 | "markers": "python_version >= '3.9'",
525 | "version": "==44.0"
526 | },
527 | "requests": {
528 | "hashes": [
529 | "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760",
530 | "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"
531 | ],
532 | "markers": "python_version >= '3.8'",
533 | "version": "==2.32.3"
534 | },
535 | "requests-toolbelt": {
536 | "hashes": [
537 | "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6",
538 | "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"
539 | ],
540 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
541 | "version": "==1.0.0"
542 | },
543 | "rfc3986": {
544 | "hashes": [
545 | "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd",
546 | "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c"
547 | ],
548 | "markers": "python_version >= '3.7'",
549 | "version": "==2.0.0"
550 | },
551 | "rich": {
552 | "hashes": [
553 | "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0",
554 | "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725"
555 | ],
556 | "markers": "python_full_version >= '3.8.0'",
557 | "version": "==14.0.0"
558 | },
559 | "setuptools": {
560 | "hashes": [
561 | "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f",
562 | "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"
563 | ],
564 | "index": "pypi",
565 | "markers": "python_version >= '3.7'",
566 | "version": "==68.0.0"
567 | },
568 | "twine": {
569 | "hashes": [
570 | "sha256:a47f973caf122930bf0fbbf17f80b83bc1602c9ce393c7845f289a3001dc5384",
571 | "sha256:be324f6272eff91d07ee93f251edf232fc647935dd585ac003539b42404a8dbd"
572 | ],
573 | "index": "pypi",
574 | "markers": "python_version >= '3.8'",
575 | "version": "==6.1.0"
576 | },
577 | "typing-extensions": {
578 | "hashes": [
579 | "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4",
580 | "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af"
581 | ],
582 | "index": "pypi",
583 | "markers": "python_version >= '3.9'",
584 | "version": "==4.14.0"
585 | },
586 | "urllib3": {
587 | "hashes": [
588 | "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466",
589 | "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813"
590 | ],
591 | "markers": "python_version >= '3.9'",
592 | "version": "==2.4.0"
593 | },
594 | "wheel": {
595 | "hashes": [
596 | "sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729",
597 | "sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248"
598 | ],
599 | "index": "pypi",
600 | "markers": "python_version >= '3.8'",
601 | "version": "==0.45.1"
602 | },
603 | "zipp": {
604 | "hashes": [
605 | "sha256:dd2f28c3ce4bc67507bfd3781d21b7bb2be31103b51a4553ad7d90b84e57ace5",
606 | "sha256:fe208f65f2aca48b81f9e6fd8cf7b8b32c26375266b009b413d45306b6148343"
607 | ],
608 | "markers": "python_version >= '3.9'",
609 | "version": "==3.22.0"
610 | }
611 | }
612 | }
613 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # python-cfdiclient
2 |
3 | Cliente Python Web Service del SAT para la descarga masiva de xml
4 |
5 | ## Consulta y recuperación de comprobantes (Nuevo)
6 |
7 | https://www.sat.gob.mx/consultas/42968/consulta-y-recuperacion-de-comprobantes-(nuevo)
8 |
9 | ## Instalacion
10 |
11 | En Windows requiere Microsoft Visual C++ Compiler for Python 2.7
12 |
13 | ```bash
14 | pip install cfdiclient
15 | ```
16 |
17 | ## Ejemplo Completo
18 |
19 | ```python
20 | import base64
21 | import datetime
22 | import os
23 | import time
24 |
25 | from cfdiclient import (Autenticacion, DescargaMasiva, Fiel, SolicitaDescarga,
26 | VerificaSolicitudDescarga)
27 |
28 | RFC = 'IUAL9406031K4'
29 | FIEL_CER = 'asd.cer'
30 | FIEL_KEY = 'df.key'
31 | FIEL_PAS = ''
32 | FECHA_INICIAL = datetime.date(2020, 1, 1)
33 | FECHA_FINAL = datetime.date(2020, 6, 24)
34 | PATH = 'Inputs/IUAL9406031K4/'
35 |
36 | cer_der = open(os.path.join(PATH, FIEL_CER), 'rb').read()
37 | key_der = open(os.path.join(PATH, FIEL_KEY), 'rb').read()
38 |
39 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
40 |
41 | auth = Autenticacion(fiel)
42 |
43 | token = auth.obtener_token()
44 |
45 | print('TOKEN: ', token)
46 |
47 | descarga = SolicitaDescarga(fiel)
48 |
49 | # EMITIDOS
50 | # solicitud = descarga.solicitar_descarga(
51 | # token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_emisor=RFC, tipo_solicitud='CFDI'
52 | # )
53 |
54 | # RECIBIDOS
55 | solicitud = descarga.solicitar_descarga(
56 | token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_receptor=RFC, tipo_solicitud='CFDI'
57 | )
58 |
59 | print('SOLICITUD:', solicitud)
60 |
61 | while True:
62 |
63 | token = auth.obtener_token()
64 |
65 | print('TOKEN: ', token)
66 |
67 | verificacion = VerificaSolicitudDescarga(fiel)
68 |
69 | verificacion = verificacion.verificar_descarga(
70 | token, RFC, solicitud['id_solicitud'])
71 |
72 | print('SOLICITUD:', verificacion)
73 |
74 | estado_solicitud = int(verificacion['estado_solicitud'])
75 |
76 | # 0, Token invalido.
77 | # 1, Aceptada
78 | # 2, En proceso
79 | # 3, Terminada
80 | # 4, Error
81 | # 5, Rechazada
82 | # 6, Vencida
83 |
84 | if estado_solicitud <= 2:
85 |
86 | # Si el estado de solicitud esta Aceptado o en proceso el programa espera
87 | # 60 segundos y vuelve a tratar de verificar
88 | time.sleep(60)
89 |
90 | continue
91 |
92 | elif estado_solicitud >= 4:
93 |
94 | print('ERROR:', estado_solicitud)
95 |
96 | break
97 |
98 | else:
99 | # Si el estatus es 3 se trata de descargar los paquetes
100 |
101 | for paquete in verificacion['paquetes']:
102 |
103 | descarga = DescargaMasiva(fiel)
104 |
105 | descarga = descarga.descargar_paquete(token, RFC, paquete)
106 |
107 | print('PAQUETE: ', paquete)
108 |
109 | with open('{}.zip'.format(paquete), 'wb') as fp:
110 |
111 | fp.write(base64.b64decode(descarga['paquete_b64']))
112 |
113 | break
114 | ```
115 |
116 | ## Ejemplo
117 |
118 | ### Autenticacion
119 |
120 | ```python
121 | from cfdiclient import Autenticacion
122 | from cfdiclient import Fiel
123 |
124 | FIEL_KEY = 'Claveprivada_FIEL_XAXX010101000_20180918_134149.key'
125 | FIEL_CER = 'XAXX010101000.cer'
126 | FIEL_PAS = 'contrasena'
127 | cer_der = open(FIEL_CER, 'rb').read()
128 | key_der = open(FIEL_KEY, 'rb').read()
129 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
130 |
131 | auth = Autenticacion(fiel)
132 |
133 | token = auth.obtener_token()
134 |
135 | print(token)
136 | ```
137 |
138 | ### Solicita Descarga
139 |
140 | ```python
141 | import datetime
142 | from cfdiclient import SolicitaDescarga
143 | from cfdiclient import Fiel
144 |
145 | FIEL_KEY = 'Claveprivada_FIEL_XAXX010101000_20180918_134149.key'
146 | FIEL_CER = 'XAXX010101000.cer'
147 | FIEL_PAS = 'contrasena'
148 | cer_der = open(FIEL_CER, 'rb').read()
149 | key_der = open(FIEL_KEY, 'rb').read()
150 |
151 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
152 |
153 | descarga = SolicitaDescarga(fiel)
154 |
155 | token = 'eyJh'
156 | rfc_solicitante = 'XAXX010101000'
157 | fecha_inicial = datetime.datetime(2018, 1, 1)
158 | fecha_final = datetime.datetime(2018, 12, 31)
159 | rfc_emisor = 'XAXX010101000'
160 | rfc_receptor = 'XAXX010101000'
161 | # Emitidos
162 | result = descarga.solicitar_descarga(token, rfc_solicitante, fecha_inicial, fecha_final, rfc_emisor=rfc_emisor)
163 | print(result)
164 | # Recibidos
165 | result = descarga.solicitar_descarga(token, rfc_solicitante, fecha_inicial, fecha_final, rfc_receptor=rfc_receptor)
166 | print(result)
167 | # {'mensaje': 'Solicitud Aceptada', 'cod_estatus': '5000', 'id_solicitud': 'be2a3e76-684f-416a-afdf-0f9378c346be'}
168 | ```
169 |
170 | ### Verifica Solicitud Descarga
171 |
172 | ```python
173 | from cfdiclient import VerificaSolicitudDescarga
174 | from cfdiclient import Fiel
175 |
176 | FIEL_KEY = 'Claveprivada_FIEL_XAXX010101000_20180918_134149.key'
177 | FIEL_CER = 'XAXX010101000.cer'
178 | FIEL_PAS = 'contrasena'
179 | cer_der = open(FIEL_CER, 'rb').read()
180 | key_der = open(FIEL_KEY, 'rb').read()
181 |
182 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
183 |
184 | v_descarga = VerificaSolicitudDescarga(fiel)
185 |
186 | token = 'eyJhbGci'
187 | rfc_solicitante = 'XAXX010101000'
188 | id_solicitud = '6331caae-c253-406f-9332-126f89cc474a'
189 | result = v_descarga.verificar_descarga(token, rfc_solicitante, id_solicitud)
190 | print(result)
191 | # {'estado_solicitud': '3', 'numero_cfdis': '8', 'cod_estatus': '5000', 'paquetes': ['a4897f62-a279-4f52-bc35-03bde4081627_01'], 'codigo_estado_solicitud': '5000', 'mensaje': 'Solicitud Aceptada'}
192 | ```
193 |
194 | ### Descargar Paquetes
195 |
196 | ```python
197 | from cfdiclient import DescargaMasiva
198 | from cfdiclient import Fiel
199 |
200 | FIEL_KEY = 'Claveprivada_FIEL_XAXX010101000_20180918_134149.key'
201 | FIEL_CER = 'XAXX010101000.cer'
202 | FIEL_PAS = 'contrasena'
203 | cer_der = open(FIEL_CER, 'rb').read()
204 | key_der = open(FIEL_KEY, 'rb').read()
205 |
206 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
207 |
208 | descarga = DescargaMasiva(fiel)
209 |
210 | token = 'eyJhbG'
211 | rfc_solicitante = 'XAXX010101000'
212 | id_paquete = '2d8bbdf1-c36d-4b51-a57c-c1744acdd89c_01'
213 | result = descarga.descargar_paquete(token, rfc_solicitante, id_paquete)
214 | print(result)
215 | # {'cod_estatus': '', 'mensaje': '', 'paquete_b64': 'eyJhbG=='}
216 | ```
217 |
218 | ### Valida estado de documento
219 |
220 | ```python
221 | from cfdiclient import Validacion
222 |
223 | validacion = Validacion()
224 | rfc_emisor = 'XAXX010101000'
225 | rfc_receptor = 'XAXX010101000'
226 | total = '1000.41'
227 | uuid = '0XXX0X00-000-0XX0-XX0X-000X0X0XXX00'
228 |
229 | estado = validacion.obtener_estado(rfc_emisor, rfc_receptor, total, uuid)
230 |
231 | print(estado)
232 | # {'codigo_estatus': 'S - Comprobante obtenido satisfactoriamente.', 'es_cancelable': 'Cancelable con aceptación', 'estado': 'Vigente'}
233 | ```
234 |
--------------------------------------------------------------------------------
/certificados/ejemploCer.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luisiturrios1/python-cfdiclient/f216f6373a7406e2df36d2599ba0ea0812aaccfa/certificados/ejemploCer.cer
--------------------------------------------------------------------------------
/certificados/ejemploKey.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luisiturrios1/python-cfdiclient/f216f6373a7406e2df36d2599ba0ea0812aaccfa/certificados/ejemploKey.key
--------------------------------------------------------------------------------
/cfdiclient/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from .autenticacion import Autenticacion
3 | from .descargamasiva import DescargaMasiva
4 | from .fiel import Fiel
5 | from .solicitadescargaEmitidos import SolicitaDescargaEmitidos
6 | from .solicitadescargaRecibidos import SolicitaDescargaRecibidos
7 |
8 | from .validacioncfdi import Validacion
9 | from .verificasolicituddescarga import VerificaSolicitudDescarga
10 |
11 | __all__ = [
12 | "Autenticacion",
13 | "DescargaMasiva",
14 | "Fiel",
15 | "SolicitaDescargaEmitidos",
16 | "SolicitaDescargaRecibidos",
17 | "Validacion",
18 | "VerificaSolicitudDescarga",
19 | ]
20 |
21 | name = "cfdiclient"
22 |
23 | version = "1.6.2"
24 |
--------------------------------------------------------------------------------
/cfdiclient/autenticacion.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import base64
3 | import hashlib
4 | import uuid
5 | from datetime import datetime, timedelta
6 |
7 | from .webservicerequest import WebServiceRequest
8 |
9 |
10 | class Autenticacion(WebServiceRequest):
11 | DATE_TIME_FORMAT: str = '%Y-%m-%dT%H:%M:%S.%fZ'
12 |
13 | xml_name = 'autenticacion.xml'
14 | soap_url = 'https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/Autenticacion/Autenticacion.svc'
15 | soap_action = 'http://DescargaMasivaTerceros.gob.mx/IAutenticacion/Autentica'
16 | result_xpath = 's:Body/AutenticaResponse/AutenticaResult'
17 |
18 | internal_nsmap = {
19 | 's': 'http://schemas.xmlsoap.org/soap/envelope/',
20 | 'o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd',
21 | 'u': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd',
22 | 'des': 'http://DescargaMasivaTerceros.sat.gob.mx',
23 | '': 'http://www.w3.org/2000/09/xmldsig#',
24 | }
25 |
26 | external_nsmap = {
27 | '': 'http://DescargaMasivaTerceros.gob.mx',
28 | 's': 'http://schemas.xmlsoap.org/soap/envelope/',
29 | 'u': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd',
30 | 'o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd',
31 | }
32 |
33 | def obtener_token(self, id=uuid.uuid4(), seconds=300):
34 |
35 | date_created = datetime.utcnow()
36 | date_expires = date_created + timedelta(seconds=seconds)
37 | date_created = date_created.strftime(self.DATE_TIME_FORMAT)
38 | date_expires = date_expires.strftime(self.DATE_TIME_FORMAT)
39 |
40 | self.set_element_text(
41 | 's:Header/o:Security/u:Timestamp/u:Created',
42 | date_created
43 | )
44 | self.set_element_text(
45 | 's:Header/o:Security/u:Timestamp/u:Expires',
46 | date_expires
47 | )
48 | self.set_element_text(
49 | 's:Header/o:Security/o:BinarySecurityToken',
50 | self.signer.fiel.cer_to_base64(),
51 | )
52 |
53 | element = self.get_element('s:Header/o:Security/u:Timestamp')
54 | element_bytes = self.element_to_bytes(element)
55 | element_hash = hashlib.new('sha1', element_bytes)
56 | element_digest = element_hash.digest()
57 | element_digest_base64 = base64.b64encode(element_digest)
58 |
59 | digest_xpath = 's:Header/o:Security/Signature/SignedInfo/Reference/DigestValue'
60 | self.set_element_text(digest_xpath, element_digest_base64)
61 |
62 | signed_info_xpath = 's:Header/o:Security/Signature/SignedInfo'
63 | signed_info = self.get_element(signed_info_xpath)
64 | signed_info_bytes = self.element_to_bytes(signed_info)
65 | signed_info_sign = self.signer.fiel.firmar_sha1(signed_info_bytes)
66 |
67 | xpath = 's:Header/o:Security/Signature/SignatureValue'
68 | self.set_element_text(xpath, signed_info_sign)
69 |
70 | element_response = self.request()
71 |
72 | return element_response.text
73 |
--------------------------------------------------------------------------------
/cfdiclient/autenticacion.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/cfdiclient/descargamasiva.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from .webservicerequest import WebServiceRequest
3 |
4 |
5 | class DescargaMasiva(WebServiceRequest):
6 |
7 | xml_name = 'descargamasiva.xml'
8 | soap_url = 'https://cfdidescargamasiva.clouda.sat.gob.mx/DescargaMasivaService.svc'
9 | soap_action = 'http://DescargaMasivaTerceros.sat.gob.mx/IDescargaMasivaTercerosService/Descargar'
10 | solicitud_xpath = 's:Body/des:PeticionDescargaMasivaTercerosEntrada/des:peticionDescarga'
11 | result_xpath = 's:Body/RespuestaDescargaMasivaTercerosSalida/Paquete'
12 |
13 | def descargar_paquete(self, token, rfc_solicitante, id_paquete):
14 |
15 | arguments = {
16 | 'RfcSolicitante': rfc_solicitante.upper(),
17 | 'IdPaquete': id_paquete,
18 | }
19 |
20 | element_response = self.request(token, arguments)
21 |
22 | respuesta = element_response.getparent().getparent().getparent().find(
23 | 's:Header/h:respuesta', namespaces=self.external_nsmap
24 | )
25 |
26 | ret_val = {
27 | 'cod_estatus': respuesta.get('CodEstatus'),
28 | 'mensaje': respuesta.get('Mensaje'),
29 | 'paquete_b64': element_response.text,
30 | }
31 |
32 | return ret_val
33 |
--------------------------------------------------------------------------------
/cfdiclient/descargamasiva.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cfdiclient/fiel.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import base64
3 |
4 | from Crypto.Hash import SHA
5 | from Crypto.PublicKey import RSA
6 | from Crypto.Signature import PKCS1_v1_5
7 | from OpenSSL import crypto
8 |
9 |
10 | class Fiel():
11 | def __init__(self, cer_der, key_der, passphrase):
12 | self.__importar_cer__(cer_der)
13 | self.__importar_key__(key_der, passphrase)
14 |
15 | def __importar_cer__(self, cer_der):
16 | # Cargar certificado en formato DER
17 | self.cer = crypto.load_certificate(crypto.FILETYPE_ASN1, cer_der)
18 |
19 | def __importar_key__(self, key_der, passphrase):
20 | # Importar KEY en formato DER
21 | self.key = RSA.importKey(key_der, passphrase)
22 | # Crear objeto para firmar
23 | self.signer = PKCS1_v1_5.new(self.key)
24 |
25 | def firmar_sha1(self, texto):
26 | # Generar SHA1
27 | sha1 = SHA.new(texto)
28 | # Firmar
29 | firma = self.signer.sign(sha1)
30 | # Pasar a base64
31 | b64_firma = base64.b64encode(firma)
32 | return b64_firma
33 |
34 | def cer_to_base64(self):
35 | # Extraer DER de certificado
36 | cer = crypto.dump_certificate(crypto.FILETYPE_ASN1, self.cer)
37 | # Pasar a b64
38 | return base64.b64encode(cer)
39 |
40 | def cer_issuer(self):
41 | # Extraer issuer
42 | d = self.cer.get_issuer().get_components()
43 | # Generar cadena issuer
44 | return u','.join(['{key}={value}'.format(key=key.decode(), value=value.decode()) for key, value in d])
45 |
46 | def cer_serial_number(self):
47 | # Obtener numero de serie del certificado
48 | serial = self.cer.get_serial_number()
49 | # Pasar numero de serie a string
50 | return str(serial)
51 |
--------------------------------------------------------------------------------
/cfdiclient/signer.py:
--------------------------------------------------------------------------------
1 | import base64
2 | import hashlib
3 |
4 | from lxml import etree
5 |
6 | from .fiel import Fiel
7 | from .utils import Utils
8 |
9 |
10 | class Signer(Utils):
11 |
12 | nsmap = {
13 | None: 'http://www.w3.org/2000/09/xmldsig#'
14 | }
15 |
16 | xml_name = 'signer.xml'
17 |
18 | def __init__(self, fiel: Fiel) -> None:
19 | super().__init__()
20 | self.fiel = fiel
21 |
22 | def sign(self, element: etree.Element) -> etree.Element:
23 |
24 | element_bytes = self.element_to_bytes(element.getparent())
25 | element_hash = hashlib.new('sha1', element_bytes)
26 | element_digest = element_hash.digest()
27 | element_digest_base64 = base64.b64encode(element_digest)
28 |
29 | digest_xpath = 'SignedInfo/Reference/DigestValue'
30 | digest_element = self.get_element(digest_xpath)
31 | digest_element.text = element_digest_base64
32 |
33 | signed_info_xpath = 'SignedInfo'
34 | signed_info = self.get_element(signed_info_xpath)
35 | signed_info_bytes = self.element_to_bytes(signed_info)
36 | signed_info_sign = self.fiel.firmar_sha1(signed_info_bytes)
37 |
38 | xpath = 'SignatureValue'
39 | self.set_element_text(xpath, signed_info_sign)
40 |
41 | xpath = 'KeyInfo/X509Data/X509Certificate'
42 | self.set_element_text(xpath, self.fiel.cer_to_base64())
43 |
44 | xpath = 'KeyInfo/X509Data/X509IssuerSerial/X509IssuerName'
45 | self.set_element_text(xpath, self.fiel.cer_issuer())
46 |
47 | xpath = 'KeyInfo/X509Data/X509IssuerSerial/X509SerialNumber'
48 | self.set_element_text(xpath, self.fiel.cer_serial_number())
49 |
50 | element.append(self.element_root)
51 |
52 | return element
53 |
--------------------------------------------------------------------------------
/cfdiclient/signer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/cfdiclient/solicitadescargaEmitidos.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from .webservicerequest import WebServiceRequest
3 |
4 |
5 | class SolicitaDescargaEmitidos(WebServiceRequest):
6 |
7 | xml_name = 'solicitadescargaEmitidos.xml'
8 | soap_url = 'https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/SolicitaDescargaService.svc'
9 | soap_action = 'http://DescargaMasivaTerceros.sat.gob.mx/ISolicitaDescargaService/SolicitaDescargaEmitidos'
10 | solicitud_xpath = 's:Body/des:SolicitaDescargaEmitidos/des:solicitud'
11 | result_xpath = 's:Body/SolicitaDescargaEmitidosResponse/SolicitaDescargaEmitidosResult'
12 |
13 | def solicitar_descarga(
14 | self, token, rfc_solicitante, fecha_inicial, fecha_final,
15 | rfc_emisor=None, rfc_receptor=None, tipo_solicitud='CFDI',
16 | tipo_comprobante=None, estado_comprobante=None,
17 | rfc_a_cuenta_terceros=None, complemento=None, uuid=None
18 | ):
19 |
20 | arguments = {
21 | 'RfcSolicitante': rfc_solicitante.upper(),
22 | 'FechaFinal': fecha_final.strftime(self.DATE_TIME_FORMAT),
23 | 'FechaInicial': fecha_inicial.strftime(self.DATE_TIME_FORMAT),
24 | 'TipoSolicitud': tipo_solicitud,
25 | 'TipoComprobante': tipo_comprobante,
26 | 'EstadoComprobante': estado_comprobante,
27 | 'RfcACuentaTerceros': rfc_a_cuenta_terceros,
28 | 'Complemento': complemento,
29 | 'UUID': uuid,
30 | }
31 |
32 | if rfc_emisor:
33 | arguments['RfcEmisor'] = rfc_emisor.upper()
34 |
35 | if rfc_receptor:
36 | arguments['RfcReceptores'] = [rfc_receptor.upper()]
37 |
38 | element_response = self.request(token, arguments)
39 |
40 | ret_val = {
41 | 'id_solicitud': element_response.get('IdSolicitud'),
42 | 'cod_estatus': element_response.get('CodEstatus'),
43 | 'mensaje': element_response.get('Mensaje')
44 | }
45 |
46 | return ret_val
47 |
--------------------------------------------------------------------------------
/cfdiclient/solicitadescargaEmitidos.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/cfdiclient/solicitadescargaRecibidos.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from .webservicerequest import WebServiceRequest
3 |
4 |
5 | class SolicitaDescargaRecibidos(WebServiceRequest):
6 |
7 | xml_name = 'solicitadescargaRecibidos.xml'
8 | soap_url = 'https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/SolicitaDescargaService.svc'
9 | soap_action = 'http://DescargaMasivaTerceros.sat.gob.mx/ISolicitaDescargaService/SolicitaDescargaRecibidos'
10 | solicitud_xpath = 's:Body/des:SolicitaDescargaRecibidos/des:solicitud'
11 | result_xpath = 's:Body/SolicitaDescargaRecibidosResponse/SolicitaDescargaRecibidosResult'
12 |
13 | def solicitar_descarga(
14 | self, token, rfc_solicitante, fecha_inicial, fecha_final,
15 | rfc_emisor=None, rfc_receptor=None, tipo_solicitud='CFDI',
16 | tipo_comprobante=None, estado_comprobante=None,
17 | rfc_a_cuenta_terceros=None, complemento=None, uuid=None
18 | ):
19 |
20 | arguments = {
21 | 'RfcSolicitante': rfc_solicitante.upper(),
22 | 'FechaFinal': fecha_final.strftime(self.DATE_TIME_FORMAT),
23 | 'FechaInicial': fecha_inicial.strftime(self.DATE_TIME_FORMAT),
24 | 'TipoSolicitud': tipo_solicitud,
25 | 'TipoComprobante': tipo_comprobante,
26 | 'EstadoComprobante': estado_comprobante,
27 | 'RfcACuentaTerceros': rfc_a_cuenta_terceros,
28 | 'Complemento': complemento,
29 | 'UUID': uuid,
30 | 'RfcReceptor': rfc_receptor
31 | }
32 |
33 | element_response = self.request(token, arguments)
34 |
35 | ret_val = {
36 | 'id_solicitud': element_response.get('IdSolicitud'),
37 | 'cod_estatus': element_response.get('CodEstatus'),
38 | 'mensaje': element_response.get('Mensaje')
39 | }
40 |
41 | return ret_val
42 |
--------------------------------------------------------------------------------
/cfdiclient/solicitadescargaRecibidos.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/cfdiclient/utils.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | from lxml import etree
4 |
5 |
6 | class Utils():
7 |
8 | internal_nsmap = {
9 | 's': 'http://schemas.xmlsoap.org/soap/envelope/',
10 | 'o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd',
11 | 'u': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd',
12 | 'des': 'http://DescargaMasivaTerceros.sat.gob.mx',
13 | '': 'http://www.w3.org/2000/09/xmldsig#',
14 | #'': 'http://DescargaMasivaTerceros.gob.mx',
15 | }
16 |
17 | external_nsmap = {
18 | '': 'http://DescargaMasivaTerceros.sat.gob.mx',
19 | 's': 'http://schemas.xmlsoap.org/soap/envelope/',
20 | 'u': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd',
21 | 'o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd',
22 | 'h':'http://DescargaMasivaTerceros.sat.gob.mx',
23 | 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
24 | 'xsd': 'http://www.w3.org/2001/XMLSchema',
25 | }
26 |
27 | xml_name: str = None
28 |
29 | def __init__(self) -> None:
30 | self.read_xml(self.xml_name)
31 |
32 | def read_xml(self, xml_name: str) -> etree.Element:
33 | current_dir = os.path.dirname(os.path.abspath(__file__))
34 | xml_path = os.path.join(current_dir, xml_name)
35 | parser = etree.XMLParser(remove_blank_text=True)
36 | self.element_root = etree.parse(xml_path, parser).getroot()
37 | return self.element_root
38 |
39 | def get_element(self, xpath: str) -> etree.Element:
40 | return self.element_root.find(xpath, self.internal_nsmap)
41 |
42 | def get_element_external(self, element: etree.Element, xpath: str) -> etree.Element:
43 | return element.find(xpath, self.external_nsmap)
44 |
45 | def set_element_text(self, xpath: str, text: str) -> None:
46 | element = self.element_root.find(xpath, self.internal_nsmap)
47 | element.text = text
48 |
49 | @classmethod
50 | def element_to_bytes(cls, element: etree.Element) -> bytes:
51 | return etree.tostring(element, method='c14n', exclusive=1)
52 |
--------------------------------------------------------------------------------
/cfdiclient/validacioncfdi.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import requests
3 | from lxml import etree
4 |
5 |
6 | class Validacion():
7 | def __init__(self, verify=True, timeout=15):
8 | self.SOAP_URL = 'https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc'
9 | self.SOAP_ACTION = 'http://tempuri.org/IConsultaCFDIService/Consulta'
10 | self.NSMAP = {
11 | 's': 'http://schemas.xmlsoap.org/soap/envelope/',
12 | 'des': 'http://DescargaMasivaTerceros.sat.gob.mx',
13 | 'xd': 'http://www.w3.org/2000/09/xmldsig#'
14 | }
15 | self.verify = verify
16 | self.timeout = timeout
17 |
18 | def __generar_soapreq__(self, rfc_emisor, rfc_receptor, total, uuid):
19 | soapreq = (''
20 | + ''
21 | + ''
22 | + ''
23 | + ''
24 | + ''
25 | + ''
26 | + ''
27 | + ''
28 | + ''
29 | +'')
30 |
31 | return soapreq
32 |
33 | def obtener_estado(self, rfc_emisor, rfc_receptor, total, uuid):
34 | soapreq = self.__generar_soapreq__(rfc_emisor, rfc_receptor, total, uuid)
35 |
36 | headers = {
37 | 'Content-type': 'text/xml;charset="utf-8"',
38 | 'Accept': 'text/xml',
39 | 'Cache-Control': 'no-cache',
40 | 'SOAPAction': self.SOAP_ACTION,
41 | }
42 |
43 | response = requests.post(
44 | self.SOAP_URL,
45 | data=soapreq,
46 | headers=headers,
47 | verify=self.verify,
48 | timeout=self.timeout,
49 | )
50 |
51 |
52 | if response.status_code != requests.codes['ok']:
53 | if not response.text.startswith('
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cfdiclient/webservicerequest.py:
--------------------------------------------------------------------------------
1 | """cfdiclient.WebServiceRequest"""
2 | import logging
3 |
4 | import requests
5 | from lxml import etree
6 |
7 | from .fiel import Fiel
8 | from .signer import Signer
9 | from .utils import Utils
10 |
11 | logger = logging.getLogger(__name__)
12 |
13 |
14 | class WebServiceRequest(Utils):
15 | """WebServiceRequest
16 | Base class for signed web service request
17 | """
18 | DATE_TIME_FORMAT: str = '%Y-%m-%dT%H:%M:%S'
19 |
20 | soap_url: str = None
21 | soap_action: str = None
22 | result_xpath: str = None
23 |
24 | fault_xpath: str = 's:Body/s:Fault/faultstring'
25 |
26 | def __init__(self, fiel: Fiel, verify: bool = True, timeout: int = 15) -> None:
27 | super().__init__()
28 | self.signer = Signer(fiel)
29 | self.verify = verify
30 | self.timeout = timeout
31 |
32 | def get_headers(self, token: str) -> dict:
33 | headers = {
34 | 'Content-type': 'text/xml;charset="utf-8"',
35 | 'Accept': 'text/xml',
36 | 'Cache-Control': 'no-cache',
37 | 'SOAPAction': self.soap_action,
38 | 'Authorization': 'WRAP access_token="{}"'.format(token) if token else ''
39 | }
40 | return headers
41 |
42 | def set_request_arguments(self, arguments: dict) -> etree.Element:
43 | solicitud = self.get_element(self.solicitud_xpath)
44 | for key in arguments:
45 | # TODO: Remover esta hardcodeada de aqui
46 | if key == 'RfcReceptores':
47 | for i, rfc_receptor in enumerate(arguments[key]):
48 | if i == 0:
49 | self.set_element_text(
50 | 's:Body/des:SolicitaDescargaEmitidos/des:solicitud/des:RfcReceptores/des:RfcReceptor',
51 | rfc_receptor
52 | )
53 | # TODO: Agregar mas de un RFC
54 | continue
55 | if arguments[key] != None:
56 | solicitud.set(key, arguments[key])
57 | return solicitud
58 |
59 | def request(self, token: str = None, arguments: dict = None) -> etree.Element:
60 |
61 | if arguments:
62 | solicitud = self.set_request_arguments(arguments)
63 | self.signer.sign(solicitud)
64 |
65 | headers = self.get_headers(token)
66 |
67 | soap_request = self.element_to_bytes(self.element_root)
68 |
69 | logger.debug('Request soap_url: %s', self.soap_url)
70 | logger.debug('Request headers: %s', headers)
71 | logger.debug('Request soap_request: %s', soap_request)
72 |
73 | response = requests.post(
74 | self.soap_url,
75 | data=soap_request,
76 | headers=headers,
77 | verify=self.verify,
78 | timeout=self.timeout,
79 | )
80 |
81 | logger.debug('Response headers: %s', response.headers)
82 | logger.debug('Response text: %s', response.text)
83 |
84 | try:
85 | response_xml = etree.fromstring(
86 | response.text,
87 | parser=etree.XMLParser(huge_tree=True)
88 | )
89 | except Exception:
90 | raise Exception(response.text)
91 |
92 | if response.status_code != requests.codes['ok']:
93 | error = self.get_element_external(response_xml, self.fault_xpath)
94 | raise Exception(error)
95 |
96 | return self.get_element_external(response_xml, self.result_xpath)
97 |
--------------------------------------------------------------------------------
/ejemplo_completo.py:
--------------------------------------------------------------------------------
1 | import base64
2 | import datetime
3 | import os
4 | import time
5 |
6 | from cfdiclient import Autenticacion
7 | from cfdiclient import DescargaMasiva
8 | from cfdiclient import Fiel
9 | from cfdiclient import solicitadescargaEmitidos
10 | from cfdiclient import solicitadescargaRecibidos
11 | from cfdiclient import VerificaSolicitudDescarga
12 | ##
13 | # Constantes de Loggin
14 | ##
15 | RFC = 'ESI920427886'
16 | FIEL_CER = 'ejemploCer.cer'
17 | FIEL_KEY = 'ejemploKey.key'
18 | FIEL_PAS = '12345678a'
19 | PATH = 'certificados/'
20 |
21 | cer_der = open(os.path.join(PATH, FIEL_CER), 'rb').read()
22 | key_der = open(os.path.join(PATH, FIEL_KEY), 'rb').read()
23 |
24 | FECHA_INICIAL = datetime.datetime(2025, 6, 1)
25 | FECHA_FINAL = datetime.datetime(2025, 6, 2)
26 |
27 | fiel = Fiel(cer_der, key_der, FIEL_PAS)
28 |
29 | auth = Autenticacion(fiel)
30 |
31 | token = auth.obtener_token()
32 |
33 | print('TOKEN: ', token)
34 |
35 | #descarga = solicitadescargaEmitidos.SolicitaDescargaEmitidos(fiel)
36 | descarga = solicitadescargaRecibidos.SolicitaDescargaRecibidos(fiel)
37 |
38 |
39 |
40 | # Emitidos
41 | #solicitud = descarga.solicitar_descarga(
42 | # token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_emisor=RFC,tipo_solicitud='CFDI',
43 | #)
44 |
45 | # Recibidos
46 | solicitud = descarga.solicitar_descarga(
47 | token, RFC, FECHA_INICIAL, FECHA_FINAL, rfc_receptor=RFC,tipo_solicitud='Metadata', estado_comprobante='Todos',
48 | )
49 |
50 |
51 | print('solicitar_descarga:', solicitud)
52 |
53 | if solicitud['cod_estatus'] != '5000':
54 | exit(1)
55 |
56 | while True:
57 |
58 | token = auth.obtener_token()
59 |
60 | print('TOKEN: ', token)
61 |
62 | verificacion = VerificaSolicitudDescarga(fiel)
63 |
64 | verificacion = verificacion.verificar_descarga(
65 | token, RFC, solicitud['id_solicitud'])
66 |
67 | print('verificar_descarga:', verificacion)
68 |
69 | estado_solicitud = int(verificacion['estado_solicitud'])
70 |
71 | # 0, Token invalido.
72 | # 1, Aceptada
73 | # 2, En proceso
74 | # 3, Terminada
75 | # 4, Error
76 | # 5, Rechazada
77 | # 6, Vencida
78 |
79 | if estado_solicitud <= 2:
80 |
81 | # Si el estado de solicitud esta Aceptado o en proceso el programa espera
82 | # 60 segundos y vuelve a tratar de verificar
83 | time.sleep(10)
84 |
85 | continue
86 |
87 | elif estado_solicitud >= 4:
88 |
89 | print('ERROR:', estado_solicitud)
90 |
91 | break
92 |
93 | else:
94 | # Si el estatus es 3 se trata de descargar los paquetes
95 |
96 | for paquete in verificacion['paquetes']:
97 |
98 | descarga = DescargaMasiva(fiel)
99 |
100 | descarga = descarga.descargar_paquete(token, RFC, paquete)
101 |
102 | print('PAQUETE: ', paquete)
103 |
104 | with open('{}.zip'.format(paquete), 'wb') as fp:
105 |
106 | fp.write(base64.b64decode(descarga['paquete_b64']))
107 |
108 | break
109 |
--------------------------------------------------------------------------------
/pylint.rc:
--------------------------------------------------------------------------------
1 | [MASTER]
2 |
3 | # A comma-separated list of package or module names from where C extensions may
4 | # be loaded. Extensions are loading into the active Python interpreter and may
5 | # run arbitrary code.
6 | extension-pkg-allow-list=
7 |
8 | # A comma-separated list of package or module names from where C extensions may
9 | # be loaded. Extensions are loading into the active Python interpreter and may
10 | # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
11 | # for backward compatibility.)
12 | extension-pkg-whitelist=lxml
13 |
14 | # Return non-zero exit code if any of these messages/categories are detected,
15 | # even if score is above --fail-under value. Syntax same as enable. Messages
16 | # specified are enabled, while categories only check already-enabled messages.
17 | fail-on=
18 |
19 | # Specify a score threshold to be exceeded before program exits with error.
20 | fail-under=10.0
21 |
22 | # Files or directories to be skipped. They should be base names, not paths.
23 | ignore=CVS
24 |
25 | # Add files or directories matching the regex patterns to the ignore-list. The
26 | # regex matches against paths.
27 | ignore-paths=
28 |
29 | # Files or directories matching the regex patterns are skipped. The regex
30 | # matches against base names, not paths.
31 | ignore-patterns=
32 |
33 | # Python code to execute, usually for sys.path manipulation such as
34 | # pygtk.require().
35 | #init-hook=
36 |
37 | # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
38 | # number of processors available to use.
39 | jobs=1
40 |
41 | # Control the amount of potential inferred values when inferring a single
42 | # object. This can help the performance when dealing with large functions or
43 | # complex, nested conditions.
44 | limit-inference-results=100
45 |
46 | # List of plugins (as comma separated values of python module names) to load,
47 | # usually to register additional checkers.
48 | load-plugins=
49 |
50 | # Pickle collected data for later comparisons.
51 | persistent=yes
52 |
53 | # When enabled, pylint would attempt to guess common misconfiguration and emit
54 | # user-friendly hints instead of false-positive error messages.
55 | suggestion-mode=yes
56 |
57 | # Allow loading of arbitrary C extensions. Extensions are imported into the
58 | # active Python interpreter and may run arbitrary code.
59 | unsafe-load-any-extension=no
60 |
61 |
62 | [MESSAGES CONTROL]
63 |
64 | # Only show warnings with the listed confidence levels. Leave empty to show
65 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
66 | confidence=
67 |
68 | # Disable the message, report, category or checker with the given id(s). You
69 | # can either give multiple identifiers separated by comma (,) or put this
70 | # option multiple times (only on the command line, not in the configuration
71 | # file where it should appear only once). You can also use "--disable=all" to
72 | # disable everything first and then reenable specific checks. For example, if
73 | # you want to run only the similarities checker, you can use "--disable=all
74 | # --enable=similarities". If you want to run only the classes checker, but have
75 | # no Warning level messages displayed, use "--disable=all --enable=classes
76 | # --disable=W".
77 | disable=print-statement,
78 | parameter-unpacking,
79 | unpacking-in-except,
80 | old-raise-syntax,
81 | backtick,
82 | long-suffix,
83 | old-ne-operator,
84 | old-octal-literal,
85 | import-star-module-level,
86 | non-ascii-bytes-literal,
87 | raw-checker-failed,
88 | bad-inline-option,
89 | locally-disabled,
90 | file-ignored,
91 | suppressed-message,
92 | useless-suppression,
93 | deprecated-pragma,
94 | use-symbolic-message-instead,
95 | apply-builtin,
96 | basestring-builtin,
97 | buffer-builtin,
98 | cmp-builtin,
99 | coerce-builtin,
100 | execfile-builtin,
101 | file-builtin,
102 | long-builtin,
103 | raw_input-builtin,
104 | reduce-builtin,
105 | standarderror-builtin,
106 | unicode-builtin,
107 | xrange-builtin,
108 | coerce-method,
109 | delslice-method,
110 | getslice-method,
111 | setslice-method,
112 | no-absolute-import,
113 | old-division,
114 | dict-iter-method,
115 | dict-view-method,
116 | next-method-called,
117 | metaclass-assignment,
118 | indexing-exception,
119 | raising-string,
120 | reload-builtin,
121 | oct-method,
122 | hex-method,
123 | nonzero-method,
124 | cmp-method,
125 | input-builtin,
126 | round-builtin,
127 | intern-builtin,
128 | unichr-builtin,
129 | map-builtin-not-iterating,
130 | zip-builtin-not-iterating,
131 | range-builtin-not-iterating,
132 | filter-builtin-not-iterating,
133 | using-cmp-argument,
134 | eq-without-hash,
135 | div-method,
136 | idiv-method,
137 | rdiv-method,
138 | exception-message-attribute,
139 | invalid-str-codec,
140 | sys-max-int,
141 | bad-python3-import,
142 | deprecated-string-function,
143 | deprecated-str-translate-call,
144 | deprecated-itertools-function,
145 | deprecated-types-field,
146 | next-method-defined,
147 | dict-items-not-iterating,
148 | dict-keys-not-iterating,
149 | dict-values-not-iterating,
150 | deprecated-operator-function,
151 | deprecated-urllib-function,
152 | xreadlines-attribute,
153 | deprecated-sys-function,
154 | exception-escape,
155 | comprehension-escape
156 |
157 | # Enable the message, report, category or checker with the given id(s). You can
158 | # either give multiple identifier separated by comma (,) or put this option
159 | # multiple time (only on the command line, not in the configuration file where
160 | # it should appear only once). See also the "--disable" option for examples.
161 | enable=c-extension-no-member
162 |
163 |
164 | [REPORTS]
165 |
166 | # Python expression which should return a score less than or equal to 10. You
167 | # have access to the variables 'error', 'warning', 'refactor', and 'convention'
168 | # which contain the number of messages in each category, as well as 'statement'
169 | # which is the total number of statements analyzed. This score is used by the
170 | # global evaluation report (RP0004).
171 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
172 |
173 | # Template used to display messages. This is a python new-style format string
174 | # used to format the message information. See doc for all details.
175 | #msg-template=
176 |
177 | # Set the output format. Available formats are text, parseable, colorized, json
178 | # and msvs (visual studio). You can also give a reporter class, e.g.
179 | # mypackage.mymodule.MyReporterClass.
180 | output-format=text
181 |
182 | # Tells whether to display a full report or only the messages.
183 | reports=no
184 |
185 | # Activate the evaluation score.
186 | score=yes
187 |
188 |
189 | [REFACTORING]
190 |
191 | # Maximum number of nested blocks for function / method body
192 | max-nested-blocks=5
193 |
194 | # Complete name of functions that never returns. When checking for
195 | # inconsistent-return-statements if a never returning function is called then
196 | # it will be considered as an explicit return statement and no message will be
197 | # printed.
198 | never-returning-functions=sys.exit,argparse.parse_error
199 |
200 |
201 | [LOGGING]
202 |
203 | # The type of string formatting that logging methods do. `old` means using %
204 | # formatting, `new` is for `{}` formatting.
205 | logging-format-style=old
206 |
207 | # Logging modules to check that the string format arguments are in logging
208 | # function parameter format.
209 | logging-modules=logging
210 |
211 |
212 | [SPELLING]
213 |
214 | # Limits count of emitted suggestions for spelling mistakes.
215 | max-spelling-suggestions=4
216 |
217 | # Spelling dictionary name. Available dictionaries: none. To make it work,
218 | # install the 'python-enchant' package.
219 | spelling-dict=
220 |
221 | # List of comma separated words that should be considered directives if they
222 | # appear and the beginning of a comment and should not be checked.
223 | spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
224 |
225 | # List of comma separated words that should not be checked.
226 | spelling-ignore-words=
227 |
228 | # A path to a file that contains the private dictionary; one word per line.
229 | spelling-private-dict-file=
230 |
231 | # Tells whether to store unknown words to the private dictionary (see the
232 | # --spelling-private-dict-file option) instead of raising a message.
233 | spelling-store-unknown-words=no
234 |
235 |
236 | [MISCELLANEOUS]
237 |
238 | # List of note tags to take in consideration, separated by a comma.
239 | notes=FIXME,
240 | XXX,
241 | TODO
242 |
243 | # Regular expression of note tags to take in consideration.
244 | #notes-rgx=
245 |
246 |
247 | [TYPECHECK]
248 |
249 | # List of decorators that produce context managers, such as
250 | # contextlib.contextmanager. Add to this list to register other decorators that
251 | # produce valid context managers.
252 | contextmanager-decorators=contextlib.contextmanager
253 |
254 | # List of members which are set dynamically and missed by pylint inference
255 | # system, and so shouldn't trigger E1101 when accessed. Python regular
256 | # expressions are accepted.
257 | generated-members=
258 |
259 | # Tells whether missing members accessed in mixin class should be ignored. A
260 | # mixin class is detected if its name ends with "mixin" (case insensitive).
261 | ignore-mixin-members=yes
262 |
263 | # Tells whether to warn about missing members when the owner of the attribute
264 | # is inferred to be None.
265 | ignore-none=yes
266 |
267 | # This flag controls whether pylint should warn about no-member and similar
268 | # checks whenever an opaque object is returned when inferring. The inference
269 | # can return multiple potential results while evaluating a Python object, but
270 | # some branches might not be evaluated, which results in partial inference. In
271 | # that case, it might be useful to still emit no-member and other checks for
272 | # the rest of the inferred objects.
273 | ignore-on-opaque-inference=yes
274 |
275 | # List of class names for which member attributes should not be checked (useful
276 | # for classes with dynamically set attributes). This supports the use of
277 | # qualified names.
278 | ignored-classes=optparse.Values,thread._local,_thread._local
279 |
280 | # List of module names for which member attributes should not be checked
281 | # (useful for modules/projects where namespaces are manipulated during runtime
282 | # and thus existing member attributes cannot be deduced by static analysis). It
283 | # supports qualified module names, as well as Unix pattern matching.
284 | ignored-modules=
285 |
286 | # Show a hint with possible names when a member name was not found. The aspect
287 | # of finding the hint is based on edit distance.
288 | missing-member-hint=yes
289 |
290 | # The minimum edit distance a name should have in order to be considered a
291 | # similar match for a missing member name.
292 | missing-member-hint-distance=1
293 |
294 | # The total number of similar names that should be taken in consideration when
295 | # showing a hint for a missing member.
296 | missing-member-max-choices=1
297 |
298 | # List of decorators that change the signature of a decorated function.
299 | signature-mutators=
300 |
301 |
302 | [VARIABLES]
303 |
304 | # List of additional names supposed to be defined in builtins. Remember that
305 | # you should avoid defining new builtins when possible.
306 | additional-builtins=
307 |
308 | # Tells whether unused global variables should be treated as a violation.
309 | allow-global-unused-variables=yes
310 |
311 | # List of names allowed to shadow builtins
312 | allowed-redefined-builtins=
313 |
314 | # List of strings which can identify a callback function by name. A callback
315 | # name must start or end with one of those strings.
316 | callbacks=cb_,
317 | _cb
318 |
319 | # A regular expression matching the name of dummy variables (i.e. expected to
320 | # not be used).
321 | dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
322 |
323 | # Argument names that match this expression will be ignored. Default to name
324 | # with leading underscore.
325 | ignored-argument-names=_.*|^ignored_|^unused_
326 |
327 | # Tells whether we should check for unused import in __init__ files.
328 | init-import=no
329 |
330 | # List of qualified module names which can have objects that can redefine
331 | # builtins.
332 | redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
333 |
334 |
335 | [FORMAT]
336 |
337 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
338 | expected-line-ending-format=
339 |
340 | # Regexp for a line that is allowed to be longer than the limit.
341 | ignore-long-lines=^\s*(# )??$
342 |
343 | # Number of spaces of indent required inside a hanging or continued line.
344 | indent-after-paren=4
345 |
346 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
347 | # tab).
348 | indent-string=' '
349 |
350 | # Maximum number of characters on a single line.
351 | max-line-length=100
352 |
353 | # Maximum number of lines in a module.
354 | max-module-lines=1000
355 |
356 | # Allow the body of a class to be on the same line as the declaration if body
357 | # contains single statement.
358 | single-line-class-stmt=no
359 |
360 | # Allow the body of an if to be on the same line as the test if there is no
361 | # else.
362 | single-line-if-stmt=no
363 |
364 |
365 | [SIMILARITIES]
366 |
367 | # Ignore comments when computing similarities.
368 | ignore-comments=yes
369 |
370 | # Ignore docstrings when computing similarities.
371 | ignore-docstrings=yes
372 |
373 | # Ignore imports when computing similarities.
374 | ignore-imports=no
375 |
376 | # Ignore function signatures when computing similarities.
377 | ignore-signatures=no
378 |
379 | # Minimum lines number of a similarity.
380 | min-similarity-lines=4
381 |
382 |
383 | [BASIC]
384 |
385 | # Naming style matching correct argument names.
386 | argument-naming-style=snake_case
387 |
388 | # Regular expression matching correct argument names. Overrides argument-
389 | # naming-style.
390 | #argument-rgx=
391 |
392 | # Naming style matching correct attribute names.
393 | attr-naming-style=snake_case
394 |
395 | # Regular expression matching correct attribute names. Overrides attr-naming-
396 | # style.
397 | #attr-rgx=
398 |
399 | # Bad variable names which should always be refused, separated by a comma.
400 | bad-names=foo,
401 | bar,
402 | baz,
403 | toto,
404 | tutu,
405 | tata
406 |
407 | # Bad variable names regexes, separated by a comma. If names match any regex,
408 | # they will always be refused
409 | bad-names-rgxs=
410 |
411 | # Naming style matching correct class attribute names.
412 | class-attribute-naming-style=any
413 |
414 | # Regular expression matching correct class attribute names. Overrides class-
415 | # attribute-naming-style.
416 | #class-attribute-rgx=
417 |
418 | # Naming style matching correct class constant names.
419 | class-const-naming-style=UPPER_CASE
420 |
421 | # Regular expression matching correct class constant names. Overrides class-
422 | # const-naming-style.
423 | #class-const-rgx=
424 |
425 | # Naming style matching correct class names.
426 | class-naming-style=PascalCase
427 |
428 | # Regular expression matching correct class names. Overrides class-naming-
429 | # style.
430 | #class-rgx=
431 |
432 | # Naming style matching correct constant names.
433 | const-naming-style=UPPER_CASE
434 |
435 | # Regular expression matching correct constant names. Overrides const-naming-
436 | # style.
437 | #const-rgx=
438 |
439 | # Minimum line length for functions/classes that require docstrings, shorter
440 | # ones are exempt.
441 | docstring-min-length=-1
442 |
443 | # Naming style matching correct function names.
444 | function-naming-style=snake_case
445 |
446 | # Regular expression matching correct function names. Overrides function-
447 | # naming-style.
448 | #function-rgx=
449 |
450 | # Good variable names which should always be accepted, separated by a comma.
451 | good-names=i,
452 | j,
453 | k,
454 | ex,
455 | Run,
456 | _
457 |
458 | # Good variable names regexes, separated by a comma. If names match any regex,
459 | # they will always be accepted
460 | good-names-rgxs=
461 |
462 | # Include a hint for the correct naming format with invalid-name.
463 | include-naming-hint=no
464 |
465 | # Naming style matching correct inline iteration names.
466 | inlinevar-naming-style=any
467 |
468 | # Regular expression matching correct inline iteration names. Overrides
469 | # inlinevar-naming-style.
470 | #inlinevar-rgx=
471 |
472 | # Naming style matching correct method names.
473 | method-naming-style=snake_case
474 |
475 | # Regular expression matching correct method names. Overrides method-naming-
476 | # style.
477 | #method-rgx=
478 |
479 | # Naming style matching correct module names.
480 | module-naming-style=snake_case
481 |
482 | # Regular expression matching correct module names. Overrides module-naming-
483 | # style.
484 | #module-rgx=
485 |
486 | # Colon-delimited sets of names that determine each other's naming style when
487 | # the name regexes allow several styles.
488 | name-group=
489 |
490 | # Regular expression which should only match function or class names that do
491 | # not require a docstring.
492 | no-docstring-rgx=^_
493 |
494 | # List of decorators that produce properties, such as abc.abstractproperty. Add
495 | # to this list to register other decorators that produce valid properties.
496 | # These decorators are taken in consideration only for invalid-name.
497 | property-classes=abc.abstractproperty
498 |
499 | # Naming style matching correct variable names.
500 | variable-naming-style=snake_case
501 |
502 | # Regular expression matching correct variable names. Overrides variable-
503 | # naming-style.
504 | #variable-rgx=
505 |
506 |
507 | [STRING]
508 |
509 | # This flag controls whether inconsistent-quotes generates a warning when the
510 | # character used as a quote delimiter is used inconsistently within a module.
511 | check-quote-consistency=no
512 |
513 | # This flag controls whether the implicit-str-concat should generate a warning
514 | # on implicit string concatenation in sequences defined over several lines.
515 | check-str-concat-over-line-jumps=no
516 |
517 |
518 | [IMPORTS]
519 |
520 | # List of modules that can be imported at any level, not just the top level
521 | # one.
522 | allow-any-import-level=
523 |
524 | # Allow wildcard imports from modules that define __all__.
525 | allow-wildcard-with-all=no
526 |
527 | # Analyse import fallback blocks. This can be used to support both Python 2 and
528 | # 3 compatible code, which means that the block might have code that exists
529 | # only in one or another interpreter, leading to false positives when analysed.
530 | analyse-fallback-blocks=no
531 |
532 | # Deprecated modules which should not be used, separated by a comma.
533 | deprecated-modules=
534 |
535 | # Output a graph (.gv or any supported image format) of external dependencies
536 | # to the given file (report RP0402 must not be disabled).
537 | ext-import-graph=
538 |
539 | # Output a graph (.gv or any supported image format) of all (i.e. internal and
540 | # external) dependencies to the given file (report RP0402 must not be
541 | # disabled).
542 | import-graph=
543 |
544 | # Output a graph (.gv or any supported image format) of internal dependencies
545 | # to the given file (report RP0402 must not be disabled).
546 | int-import-graph=
547 |
548 | # Force import order to recognize a module as part of the standard
549 | # compatibility libraries.
550 | known-standard-library=
551 |
552 | # Force import order to recognize a module as part of a third party library.
553 | known-third-party=enchant
554 |
555 | # Couples of modules and preferred modules, separated by a comma.
556 | preferred-modules=
557 |
558 |
559 | [CLASSES]
560 |
561 | # Warn about protected attribute access inside special methods
562 | check-protected-access-in-special-methods=no
563 |
564 | # List of method names used to declare (i.e. assign) instance attributes.
565 | defining-attr-methods=__init__,
566 | __new__,
567 | setUp,
568 | __post_init__
569 |
570 | # List of member names, which should be excluded from the protected access
571 | # warning.
572 | exclude-protected=_asdict,
573 | _fields,
574 | _replace,
575 | _source,
576 | _make
577 |
578 | # List of valid names for the first argument in a class method.
579 | valid-classmethod-first-arg=cls
580 |
581 | # List of valid names for the first argument in a metaclass class method.
582 | valid-metaclass-classmethod-first-arg=cls
583 |
584 |
585 | [DESIGN]
586 |
587 | # Maximum number of arguments for function / method.
588 | max-args=5
589 |
590 | # Maximum number of attributes for a class (see R0902).
591 | max-attributes=7
592 |
593 | # Maximum number of boolean expressions in an if statement (see R0916).
594 | max-bool-expr=5
595 |
596 | # Maximum number of branch for function / method body.
597 | max-branches=12
598 |
599 | # Maximum number of locals for function / method body.
600 | max-locals=15
601 |
602 | # Maximum number of parents for a class (see R0901).
603 | max-parents=7
604 |
605 | # Maximum number of public methods for a class (see R0904).
606 | max-public-methods=20
607 |
608 | # Maximum number of return / yield for function / method body.
609 | max-returns=6
610 |
611 | # Maximum number of statements in function / method body.
612 | max-statements=50
613 |
614 | # Minimum number of public methods for a class (see R0903).
615 | min-public-methods=2
616 |
617 |
618 | [EXCEPTIONS]
619 |
620 | # Exceptions that will emit a warning when being caught. Defaults to
621 | # "BaseException, Exception".
622 | overgeneral-exceptions=BaseException,
623 | Exception
624 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [tool:pytest]
2 | testpaths = tests
3 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import setuptools
2 |
3 | with open("README.md", "r") as fh:
4 | long_description = fh.read()
5 |
6 | setuptools.setup(
7 | name="cfdiclient",
8 | version="1.6.2",
9 | author="Luis Iturrios",
10 | author_email="luisiturrios1@gmail.com",
11 | description="Cliente Python Web Service del SAT para la descarga masiva de CFDIs",
12 | long_description=long_description,
13 | long_description_content_type="text/markdown",
14 | url="https://github.com/luisiturrios1/python-cfdiclient",
15 | packages=setuptools.find_packages(),
16 | include_package_data=True,
17 | classifiers=[
18 | "Programming Language :: Python :: 2.7",
19 | "Programming Language :: Python :: 3.6",
20 | "Programming Language :: Python :: 3.7",
21 | "Programming Language :: Python :: 3.8",
22 | "Programming Language :: Python :: 3.9",
23 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
24 | "Operating System :: OS Independent",
25 | ],
26 | install_requires=[
27 | "lxml>=4.2.5",
28 | "requests>=2.21.0",
29 | "pycryptodome>=3.7.2",
30 | "pyOpenSSL>=18.0.0",
31 | ],
32 | )
33 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luisiturrios1/python-cfdiclient/f216f6373a7406e2df36d2599ba0ea0812aaccfa/tests/__init__.py
--------------------------------------------------------------------------------
/tests/test_cfdiclient.py:
--------------------------------------------------------------------------------
1 | import cfdiclient
2 |
3 |
4 | def test_cfdiclient():
5 |
6 | assert cfdiclient.name == 'cfdiclient'
7 |
--------------------------------------------------------------------------------