# SPED para python
Biblioteca para geração dos arquivos do Sistema Público de Escrituração Digital (SPED) para Python.
Essa biblioteca é originado da ramificação do projeto python-sped de contribuição de Sergio Garcia (sergio@ginx.com.br)
## Requisitos
- python
- six
## Como instalar
$ pip install spedpy
## Objetivos do Projeto
A ideia inicial do projeto e unificar em uma única biblioteca módulos para facilitar a geração dos arquivos do SPED, diminuido o retrabalho necessário para isso e tentando ao máximo garantir que o arquivo gerado seja considerado válido pelo validador do SPED.
Não é objetivo deste projeto, remover a necessidade do programador em conhecer o SPED, bem como sua legislação e saber informar adequadamente todas as informações corretamente.
## Exemplos de uso
efd = ArquivoDigital()
efd.readfile("efd.txt")
efd.prepare()
print(efd)
Resultado 'efd.txt':
|0000|016|0|01072022|31072022|TESTE LTDA|11111111000191||MG|111111111111|3125101|||B|0|
|0001|0|
|0002|09|
|0005|TESTE LTDA|37640000|ESTM XXX XXX XXX|1300||DOS XXXX|3531979985|||
|0015|RJ|111111111|
|0015|SP|111111111111|
|0100|XXXX XXX XXXX XXXX|11111111111|SPXXXXXXX||12914001|AVENIDA ANTONIO PIRES PIMENTEL|XXXX||CENTRO|111111111|111111111|xxxx@xxxx.com.br|3507605|
|0150|CLI000000503|CONSTRUTONI MATERIAIS PARA CON|1058|05923344000196||7012595100085|3170107||AVENIDA ORLANDO RODRIGUES DA CUNHA|35||VL SAO VICENTE|
|0150|FOR000028800|TRANSPORTADORA Y23 EIRELI|1058|39848198000101||0039007510061|3125101||RUA ANTONIO MOREIRA FILHO|50||DOS TENENTES|
|0150|FOR000026707|EFIZI AZU COMERCIO LTDA|1058|34229157000105||083582452|3205002||RUA 7 A|69|SETOR B SALA 1|CIVIT II|
|0200|DESP00191|BIODIGESTOR 700L - FORTLEV|||156|07|||00||18||
|0990|12|
|B001|1|
|B990|2|
|C001|0|
|C100|1|0|CLI000000503|55|00|001|38111|31220737008145000149550010000381111212144153|11072022|11072022|4155,75|1|0|0|3582,24|0|0|0|0|3582,24|429,87|5574,32|573,51|0|52,01|239,58|0|0|
|C190|010|5401|12|4155,75|3582,24|429,87|5574,32|573,51|0|0||
|C195|8|Debito para a sub-apuracao|
|C100|1|0|FOR000026707|55|00|001|37862|31220737008145000149550010000378621423637667|05072022|05072022|949,5|1|0|0|949,5|9|0|0|0|949,5|66,47|0|0|0|14,57|67,11|0|0|
|C190|000|6118|7|949,5|949,5|66,47|0|0|0|0||
|C195|8|Debito para a sub-apuracao|
|C197|MG23000999|Debito para a sub-apuracao do produto 500133|500133|949,5|7|66,47|0|
|C197|MG24000999|Debito para a sub-apuracao do produto 500180|500180|3582,24|12|429,87|0|
|C990|10|
|D001|0|
|D100|0|1|FOR000028800|57|00|001||870|31220739848198000101570010000008701000000007|05072022|13072022|0||1851,86|0|9|1851,86|0|0|1851,86||4214|3125101|3205101|
|D190|000|2352|0|1851,86|0|0|0||
|D990|4|
|E001|1|
|E990|2|
|G001|1|
|G990|2|
|H001|1|
|H990|2|
|K001|1|
|K990|2|
|1001|1|
|1990|2|
|9001|0|
|9900|0001|1|
|9900|0002|1|
|9900|0005|1|
|9900|0015|2|
|9900|0100|1|
|9900|0150|3|
|9900|0200|1|
|9900|0990|1|
|9900|0000|1|
|9900|B001|1|
|9900|B990|1|
|9900|C001|1|
|9900|C100|2|
|9900|C190|2|
|9900|C195|2|
|9900|C197|2|
|9900|C990|1|
|9900|D001|1|
|9900|D100|1|
|9900|D190|1|
|9900|D990|1|
|9900|E001|1|
|9900|E990|1|
|9900|G001|1|
|9900|G990|1|
|9900|H001|1|
|9900|H990|1|
|9900|K001|1|
|9900|K990|1|
|9900|1001|1|
|9900|1990|1|
|9900|9001|1|
|9900|9900|35|
|9900|9990|1|
|9900|9999|1|
|9990|38|
|9999||
Raw data
{
"_id": null,
"home_page": "https://github.com/Trust-Code/python-sped",
"name": "spedpy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "sped fiscal receita federal",
"author": "Ismael Nascimento",
"author_email": "ismaelnjr@icloud.com.br",
"download_url": "https://files.pythonhosted.org/packages/d3/46/137c6baa54121a9a28bed74b42b07e64d6465d9a213c95dd7fd7b879ed8f/spedpy-1.1.4.tar.gz",
"platform": null,
"description": "# SPED para python\r\n\r\nBiblioteca para gera\u00c3\u00a7\u00c3\u00a3o dos arquivos do Sistema P\u00c3\u00bablico de Escritura\u00c3\u00a7\u00c3\u00a3o Digital (SPED) para Python.\r\n\r\nEssa biblioteca \u00c3\u00a9 originado da ramifica\u00c3\u00a7\u00c3\u00a3o do projeto python-sped de contribui\u00c3\u00a7\u00c3\u00a3o de Sergio Garcia (sergio@ginx.com.br)\r\n\r\n## Requisitos\r\n\r\n- python\r\n- six\r\n\r\n## Como instalar\r\n\r\n $ pip install spedpy\r\n\r\n## Objetivos do Projeto\r\n\r\nA ideia inicial do projeto e unificar em uma \u00c3\u00banica biblioteca m\u00c3\u00b3dulos para facilitar a gera\u00c3\u00a7\u00c3\u00a3o dos arquivos do SPED, diminuido o retrabalho necess\u00c3\u00a1rio para isso e tentando ao m\u00c3\u00a1ximo garantir que o arquivo gerado seja considerado v\u00c3\u00a1lido pelo validador do SPED.\r\n\r\nN\u00c3\u00a3o \u00c3\u00a9 objetivo deste projeto, remover a necessidade do programador em conhecer o SPED, bem como sua legisla\u00c3\u00a7\u00c3\u00a3o e saber informar adequadamente todas as informa\u00c3\u00a7\u00c3\u00b5es corretamente.\r\n\r\n## Exemplos de uso\r\n\r\n efd = ArquivoDigital()\r\n efd.readfile(\"efd.txt\")\r\n efd.prepare()\r\n print(efd)\r\n\r\nResultado 'efd.txt':\r\n\r\n|0000|016|0|01072022|31072022|TESTE LTDA|11111111000191||MG|111111111111|3125101|||B|0|\r\n|0001|0|\r\n|0002|09|\r\n|0005|TESTE LTDA|37640000|ESTM XXX XXX XXX|1300||DOS XXXX|3531979985|||\r\n|0015|RJ|111111111|\r\n|0015|SP|111111111111|\r\n|0100|XXXX XXX XXXX XXXX|11111111111|SPXXXXXXX||12914001|AVENIDA ANTONIO PIRES PIMENTEL|XXXX||CENTRO|111111111|111111111|xxxx@xxxx.com.br|3507605|\r\n|0150|CLI000000503|CONSTRUTONI MATERIAIS PARA CON|1058|05923344000196||7012595100085|3170107||AVENIDA ORLANDO RODRIGUES DA CUNHA|35||VL SAO VICENTE|\r\n|0150|FOR000028800|TRANSPORTADORA Y23 EIRELI|1058|39848198000101||0039007510061|3125101||RUA ANTONIO MOREIRA FILHO|50||DOS TENENTES|\r\n|0150|FOR000026707|EFIZI AZU COMERCIO LTDA|1058|34229157000105||083582452|3205002||RUA 7 A|69|SETOR B SALA 1|CIVIT II|\r\n|0200|DESP00191|BIODIGESTOR 700L - FORTLEV|||156|07|||00||18||\r\n|0990|12|\r\n|B001|1|\r\n|B990|2|\r\n|C001|0|\r\n|C100|1|0|CLI000000503|55|00|001|38111|31220737008145000149550010000381111212144153|11072022|11072022|4155,75|1|0|0|3582,24|0|0|0|0|3582,24|429,87|5574,32|573,51|0|52,01|239,58|0|0|\r\n|C190|010|5401|12|4155,75|3582,24|429,87|5574,32|573,51|0|0||\r\n|C195|8|Debito para a sub-apuracao|\r\n|C100|1|0|FOR000026707|55|00|001|37862|31220737008145000149550010000378621423637667|05072022|05072022|949,5|1|0|0|949,5|9|0|0|0|949,5|66,47|0|0|0|14,57|67,11|0|0|\r\n|C190|000|6118|7|949,5|949,5|66,47|0|0|0|0||\r\n|C195|8|Debito para a sub-apuracao|\r\n|C197|MG23000999|Debito para a sub-apuracao do produto 500133|500133|949,5|7|66,47|0|\r\n|C197|MG24000999|Debito para a sub-apuracao do produto 500180|500180|3582,24|12|429,87|0|\r\n|C990|10|\r\n|D001|0|\r\n|D100|0|1|FOR000028800|57|00|001||870|31220739848198000101570010000008701000000007|05072022|13072022|0||1851,86|0|9|1851,86|0|0|1851,86||4214|3125101|3205101|\r\n|D190|000|2352|0|1851,86|0|0|0||\r\n|D990|4|\r\n|E001|1|\r\n|E990|2|\r\n|G001|1|\r\n|G990|2|\r\n|H001|1|\r\n|H990|2|\r\n|K001|1|\r\n|K990|2|\r\n|1001|1|\r\n|1990|2|\r\n|9001|0|\r\n|9900|0001|1|\r\n|9900|0002|1|\r\n|9900|0005|1|\r\n|9900|0015|2|\r\n|9900|0100|1|\r\n|9900|0150|3|\r\n|9900|0200|1|\r\n|9900|0990|1|\r\n|9900|0000|1|\r\n|9900|B001|1|\r\n|9900|B990|1|\r\n|9900|C001|1|\r\n|9900|C100|2|\r\n|9900|C190|2|\r\n|9900|C195|2|\r\n|9900|C197|2|\r\n|9900|C990|1|\r\n|9900|D001|1|\r\n|9900|D100|1|\r\n|9900|D190|1|\r\n|9900|D990|1|\r\n|9900|E001|1|\r\n|9900|E990|1|\r\n|9900|G001|1|\r\n|9900|G990|1|\r\n|9900|H001|1|\r\n|9900|H990|1|\r\n|9900|K001|1|\r\n|9900|K990|1|\r\n|9900|1001|1|\r\n|9900|1990|1|\r\n|9900|9001|1|\r\n|9900|9900|35|\r\n|9900|9990|1|\r\n|9900|9999|1|\r\n|9990|38|\r\n|9999||\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Biblioteca para gera\u00e7\u00e3o dos arquivos do Sistema P\u00fablico de Escritura\u00e7\u00e3o Digital (SPED) para Python",
"version": "1.1.4",
"project_urls": {
"Homepage": "https://github.com/Trust-Code/python-sped"
},
"split_keywords": [
"sped",
"fiscal",
"receita",
"federal"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "956b5ef8c9f575b7c9345643ec5b6f1ec7f8c0e023ad7e9e3c33780f310700c5",
"md5": "c4b23c485ef5468578393a74b3bbeeab",
"sha256": "45685f8527310e85929b8576b0360802796132567c1d71328a6daa855901ce20"
},
"downloads": -1,
"filename": "spedpy-1.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c4b23c485ef5468578393a74b3bbeeab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 202624,
"upload_time": "2024-10-01T00:46:33",
"upload_time_iso_8601": "2024-10-01T00:46:33.487701Z",
"url": "https://files.pythonhosted.org/packages/95/6b/5ef8c9f575b7c9345643ec5b6f1ec7f8c0e023ad7e9e3c33780f310700c5/spedpy-1.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d346137c6baa54121a9a28bed74b42b07e64d6465d9a213c95dd7fd7b879ed8f",
"md5": "97de9c851a54e6437b5e0158230f597d",
"sha256": "65647dce08bd102c8d24366393e1b9d31c93b61506ad2e5efe99b8080aa6d770"
},
"downloads": -1,
"filename": "spedpy-1.1.4.tar.gz",
"has_sig": false,
"md5_digest": "97de9c851a54e6437b5e0158230f597d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 187882,
"upload_time": "2024-10-01T00:46:35",
"upload_time_iso_8601": "2024-10-01T00:46:35.343127Z",
"url": "https://files.pythonhosted.org/packages/d3/46/137c6baa54121a9a28bed74b42b07e64d6465d9a213c95dd7fd7b879ed8f/spedpy-1.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-01 00:46:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Trust-Code",
"github_project": "python-sped",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "spedpy"
}